Exception: Clingon::MatchError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/clingon/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#expectedObject (readonly)

Returns the value of attribute expected.



9
10
11
# File 'lib/clingon/errors.rb', line 9

def expected
  @expected
end

#receivedObject (readonly)

Returns the value of attribute received.



9
10
11
# File 'lib/clingon/errors.rb', line 9

def received
  @received
end