Exception: Yay::CircularReferenceError
- Defined in:
- lib/yay/errors.rb
Instance Attribute Summary collapse
-
#current ⇒ Object
readonly
Returns the value of attribute current.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(current, path) ⇒ CircularReferenceError
constructor
A new instance of CircularReferenceError.
- #printable_message ⇒ Object
Methods inherited from Error
Constructor Details
#initialize(current, path) ⇒ CircularReferenceError
Returns a new instance of CircularReferenceError.
51 52 53 54 |
# File 'lib/yay/errors.rb', line 51 def initialize current, path @current = current @path = path end |
Instance Attribute Details
#current ⇒ Object (readonly)
Returns the value of attribute current.
48 49 50 |
# File 'lib/yay/errors.rb', line 48 def current @current end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
49 50 51 |
# File 'lib/yay/errors.rb', line 49 def path @path end |
Instance Method Details
#printable_message ⇒ Object
56 57 58 |
# File 'lib/yay/errors.rb', line 56 def return "There is a circular reference between variables: #{path.join(' => ')} => #{current}#{printable_position}" end |