Exception: Yay::UnresolvedSubstitutionError
- Defined in:
- lib/yay/errors.rb
Overview
raised when a variable has been referenced but not given a value. for example cheese is @x without ever defining what @x is
Instance Attribute Summary collapse
-
#variable ⇒ Object
readonly
Returns the value of attribute variable.
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(variable) ⇒ UnresolvedSubstitutionError
constructor
A new instance of UnresolvedSubstitutionError.
- #printable_message ⇒ Object
Methods inherited from Error
Constructor Details
#initialize(variable) ⇒ UnresolvedSubstitutionError
Returns a new instance of UnresolvedSubstitutionError.
113 114 115 |
# File 'lib/yay/errors.rb', line 113 def initialize variable @variable = variable end |
Instance Attribute Details
#variable ⇒ Object (readonly)
Returns the value of attribute variable.
111 112 113 |
# File 'lib/yay/errors.rb', line 111 def variable @variable end |
Instance Method Details
#printable_message ⇒ Object
117 118 119 |
# File 'lib/yay/errors.rb', line 117 def return "The variable #{variable} is being used but hasn't been set #{printable_position}" end |