Exception: Clingon::MatchError
- Inherits:
-
StandardError
- Object
- StandardError
- Clingon::MatchError
- 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) ⇒ MatchError
constructor
A new instance of MatchError.
Constructor Details
#initialize(payload) ⇒ MatchError
Returns a new instance of MatchError.
10 11 12 13 14 15 |
# File 'lib/clingon/errors.rb', line 10 def initialize(payload) @expected = payload[:expected] @received = payload[:received] msg = "Value #{received} does not match #{expected}" super(msg) end |
Instance Attribute Details
#expected ⇒ Object (readonly)
Returns the value of attribute expected.
9 10 11 |
# File 'lib/clingon/errors.rb', line 9 def expected @expected end |
#received ⇒ Object (readonly)
Returns the value of attribute received.
9 10 11 |
# File 'lib/clingon/errors.rb', line 9 def received @received end |