Exception: Clingon::TypeMatchError
- Inherits:
-
StandardError
- Object
- StandardError
- Clingon::TypeMatchError
- Defined in:
- lib/clingon/errors.rb
Instance Attribute Summary collapse
-
#expected ⇒ Object
readonly
Returns the value of attribute expected.
-
#received ⇒ Object
readonly
Returns the value of attribute received.
Instance Method Summary collapse
-
#initialize(payload) ⇒ TypeMatchError
constructor
A new instance of TypeMatchError.
Constructor Details
#initialize(payload) ⇒ TypeMatchError
Returns a new instance of TypeMatchError.
51 52 53 54 55 56 |
# File 'lib/clingon/errors.rb', line 51 def initialize(payload) @expected = payload[:expected] @received = payload[:received] msg = "Received #{received}, expected type #{expected}" super(msg) end |
Instance Attribute Details
#expected ⇒ Object (readonly)
Returns the value of attribute expected.
50 51 52 |
# File 'lib/clingon/errors.rb', line 50 def expected @expected end |
#received ⇒ Object (readonly)
Returns the value of attribute received.
50 51 52 |
# File 'lib/clingon/errors.rb', line 50 def received @received end |