diff options
Diffstat (limited to 'Library/Homebrew/formula.rb')
| -rw-r--r-- | Library/Homebrew/formula.rb | 19 | 
1 files changed, 19 insertions, 0 deletions
| diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 80e2e478c..1d9c1034c 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -2,6 +2,7 @@ require 'download_strategy'  require 'dependency_collector'  require 'formula_support'  require 'formula_lock' +require 'formula_pin'  require 'hardware'  require 'bottles'  require 'patches' @@ -68,6 +69,8 @@ class Formula        # make sure to strip "--" from the start of options        self.class.build.add opt[/--(.+)$/, 1], desc      end + +    @pin = FormulaPin.new(self)    end    def url;      @active_spec.url;     end @@ -80,6 +83,22 @@ class Formula      installed_prefix.children.length > 0 rescue false    end +  def pinable? +    @pin.pinable? +  end + +  def pinned? +    @pin.pinned? +  end + +  def pin +    @pin.pin +  end + +  def unpin +    @pin.unpin +  end +    def linked_keg      HOMEBREW_REPOSITORY/'Library/LinkedKegs'/@name    end | 
