From 90f69372ce046f52d9da0ee3b059d3526c12c3e6 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Mon, 28 Jul 2014 16:23:42 -0500 Subject: Remove inheritance patch classes --- Library/Homebrew/patch.rb | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'Library') diff --git a/Library/Homebrew/patch.rb b/Library/Homebrew/patch.rb index 2b60a2e4d..973bc3b71 100644 --- a/Library/Homebrew/patch.rb +++ b/Library/Homebrew/patch.rb @@ -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 -- cgit v1.2.3