Exception: Mona::NoMatchError

Inherits:
Error
  • Object
show all
Defined in:
lib/mona/no_match_error.rb

Overview

raised by ResultMatch.call when no match is found

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(result) ⇒ NoMatchError

Returns a new instance of NoMatchError.



9
10
11
12
# File 'lib/mona/no_match_error.rb', line 9

def initialize(result)
  @result = result
  super("No match found for #{@result}")
end

Instance Attribute Details

#resultObject (readonly)

Returns the value of attribute result.



7
8
9
# File 'lib/mona/no_match_error.rb', line 7

def result
  @result
end