Exception: Atomy::MessageMismatch
- Defined in:
- lib/atomy/errors.rb
Instance Attribute Summary collapse
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#receiver ⇒ Object
readonly
Returns the value of attribute receiver.
Instance Method Summary collapse
-
#initialize(name, receiver, arguments = []) ⇒ MessageMismatch
constructor
A new instance of MessageMismatch.
- #to_s ⇒ Object
Constructor Details
#initialize(name, receiver, arguments = []) ⇒ MessageMismatch
Returns a new instance of MessageMismatch.
44 45 46 47 48 |
# File 'lib/atomy/errors.rb', line 44 def initialize(name, receiver, arguments = []) @name = name @receiver = receiver @arguments = arguments end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
42 43 44 |
# File 'lib/atomy/errors.rb', line 42 def arguments @arguments end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
42 43 44 |
# File 'lib/atomy/errors.rb', line 42 def name @name end |
#receiver ⇒ Object (readonly)
Returns the value of attribute receiver.
42 43 44 |
# File 'lib/atomy/errors.rb', line 42 def receiver @receiver end |
Instance Method Details
#to_s ⇒ Object
50 51 52 |
# File 'lib/atomy/errors.rb', line 50 def to_s "message `#{@name}(#{@arguments.collect(&:inspect).join(", ")})' was not understood by #{@receiver.inspect} (#{@receiver.class})" end |