Class: Monkey::Matcher
- Inherits:
-
Object
- Object
- Monkey::Matcher
- Defined in:
- lib/monkey/matcher.rb
Instance Method Summary collapse
- #===(other) ⇒ Object
-
#initialize(&block) ⇒ Matcher
constructor
A new instance of Matcher.
Constructor Details
#initialize(&block) ⇒ Matcher
Returns a new instance of Matcher.
3 4 5 |
# File 'lib/monkey/matcher.rb', line 3 def initialize(&block) @block = block end |
Instance Method Details
#===(other) ⇒ Object
7 8 9 |
# File 'lib/monkey/matcher.rb', line 7 def ===(other) @block.call(other) end |