Remove inheritance patch classes

This commit is contained in:
Jack Nagel 2014-07-28 16:23:42 -05:00
parent 2013d153e5
commit 90f69372ce

View File

@ -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