Class: Rodakase::Transaction::Matcher::Error
- Inherits:
-
Object
- Object
- Rodakase::Transaction::Matcher::Error
- Defined in:
- lib/rodakase/transaction/matcher.rb
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
-
#initialize(result) ⇒ Error
constructor
A new instance of Error.
- #on(code) {|result.value| ... } ⇒ Object
Constructor Details
#initialize(result) ⇒ Error
Returns a new instance of Error.
9 10 11 |
# File 'lib/rodakase/transaction/matcher.rb', line 9 def initialize(result) @result = result end |
Instance Attribute Details
#result ⇒ Object (readonly)
Returns the value of attribute result.
7 8 9 |
# File 'lib/rodakase/transaction/matcher.rb', line 7 def result @result end |
Instance Method Details
#on(code) {|result.value| ... } ⇒ Object
13 14 15 |
# File 'lib/rodakase/transaction/matcher.rb', line 13 def on(code, &block) yield(result.value) if result.code == code end |