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