Exception: FormulaValidationError

Inherits:
StandardError
  • Object
show all
Defined in:
Library/Homebrew/exceptions.rb

Overview

Raised when an invalid attribute is used in a formula.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(formula, attr, value) ⇒ FormulaValidationError

Returns a new instance of FormulaValidationError.


55
56
57
58
59
# File 'Library/Homebrew/exceptions.rb', line 55

def initialize(formula, attr, value)
  @attr = attr
  @formula = formula
  super "invalid attribute for formula '#{formula}': #{attr} (#{value.inspect})"
end

Instance Attribute Details

#attrObject (readonly)

Returns the value of attribute attr


53
54
55
# File 'Library/Homebrew/exceptions.rb', line 53

def attr
  @attr
end

#formulaObject (readonly)

Returns the value of attribute formula


53
54
55
# File 'Library/Homebrew/exceptions.rb', line 53

def formula
  @formula
end