Exception: Yay::CircularReferenceError

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(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

#currentObject (readonly)

Returns the value of attribute current.



48
49
50
# File 'lib/yay/errors.rb', line 48

def current
  @current
end

#pathObject (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_messageObject



56
57
58
# File 'lib/yay/errors.rb', line 56

def printable_message
  return "There is a circular reference between variables: #{path.join(' => ')} => #{current}#{printable_position}"
end