Class: Monkey::Matcher

Inherits:
Object
  • Object
show all
Defined in:
lib/monkey/matcher.rb

Instance Method Summary collapse

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