Exception: Yay::UnresolvedSubstitutionError

Inherits:
Error
  • Object
show all
Defined in:
lib/yay/errors.rb

Instance Attribute Summary collapse

Attributes inherited from Error

#position

Instance Method Summary collapse

Methods inherited from Error

#printable_position

Constructor Details

#initialize(variable) ⇒ UnresolvedSubstitutionError

Returns a new instance of UnresolvedSubstitutionError.



64
65
66
# File 'lib/yay/errors.rb', line 64

def initialize variable
  @variable = variable
end

Instance Attribute Details

#variableObject (readonly)

Returns the value of attribute variable.



62
63
64
# File 'lib/yay/errors.rb', line 62

def variable
  @variable
end

Instance Method Details

#printable_messageObject



68
69
70
# File 'lib/yay/errors.rb', line 68

def printable_message
  return "The variable #{variable} is being used but hasn't been set #{printable_position}"
end