diff options
Diffstat (limited to 'Library/Homebrew/patch.rb')
| -rw-r--r-- | Library/Homebrew/patch.rb | 20 |
1 files changed, 10 insertions, 10 deletions
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 |
