diff options
| author | Jack Nagel | 2014-07-28 16:23:42 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-07-28 16:23:42 -0500 |
| commit | b1d641966c2643991e472045907bc7a42a0fed68 (patch) | |
| tree | 0a4c83b43873a1ffa7e2fefc8d2adc24222b5bf5 /Library | |
| parent | 81fdaec293f3d0f5bb19c53df28e8b5fb859ea3c (diff) | |
| download | homebrew-b1d641966c2643991e472045907bc7a42a0fed68.tar.bz2 | |
Remove inheritance patch classes
Diffstat (limited to 'Library')
| -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 |
