Remove inheritance patch classes
This commit is contained in:
parent
2013d153e5
commit
90f69372ce
@ -48,22 +48,19 @@ class Patch
|
||||
|
||||
patches
|
||||
end
|
||||
|
||||
attr_reader :whence
|
||||
|
||||
def external?
|
||||
whence == :resource
|
||||
end
|
||||
end
|
||||
|
||||
class IOPatch < Patch
|
||||
class IOPatch
|
||||
attr_writer :owner
|
||||
attr_reader :strip
|
||||
|
||||
def external?
|
||||
false
|
||||
end
|
||||
|
||||
def initialize(io, strip)
|
||||
@io = io
|
||||
@strip = strip
|
||||
@whence = :io
|
||||
end
|
||||
|
||||
def apply
|
||||
@ -83,13 +80,16 @@ class IOPatch < Patch
|
||||
end
|
||||
end
|
||||
|
||||
class ExternalPatch < Patch
|
||||
class ExternalPatch
|
||||
attr_reader :resource, :strip
|
||||
|
||||
def initialize(strip, &block)
|
||||
@strip = strip
|
||||
@resource = Resource.new("patch", &block)
|
||||
@whence = :resource
|
||||
end
|
||||
|
||||
def external?
|
||||
true
|
||||
end
|
||||
|
||||
def owner= owner
|
||||
|
Loading…
x
Reference in New Issue
Block a user