diff options
Diffstat (limited to 'Library/Homebrew/formula_support.rb')
| -rw-r--r-- | Library/Homebrew/formula_support.rb | 20 | 
1 files changed, 20 insertions, 0 deletions
| diff --git a/Library/Homebrew/formula_support.rb b/Library/Homebrew/formula_support.rb index 2430c31b0..c76ed39f3 100644 --- a/Library/Homebrew/formula_support.rb +++ b/Library/Homebrew/formula_support.rb @@ -55,3 +55,23 @@ EOS      end.strip    end  end + +# Used to annotate formulae that don't require compiling or cannot build bottle. +class BottleDisableReason +  def initialize(type, reason) +    @type = type +    @reason = reason +  end + +  def unneeded? +    @type == :unneeded +  end + +  def to_s +    if @type == :unneeded +      "This formula doesn't require compiling." +    else +      @reason +    end +  end +end | 
