Class: Tengu::ReceiveMatcher
- Defined in:
- lib/tengu/receive_matcher.rb
Instance Attribute Summary
Attributes inherited from Matcher
Instance Method Summary collapse
-
#initialize(method_message, message, &block) ⇒ ReceiveMatcher
constructor
A new instance of ReceiveMatcher.
- #with(*args) ⇒ Object
Methods inherited from Matcher
Constructor Details
#initialize(method_message, message, &block) ⇒ ReceiveMatcher
Returns a new instance of ReceiveMatcher.
5 6 7 8 9 10 |
# File 'lib/tengu/receive_matcher.rb', line 5 def initialize(, , &block) @method_message = @message = @with = nil super(, &block) end |
Instance Method Details
#with(*args) ⇒ Object
12 13 14 15 16 |
# File 'lib/tengu/receive_matcher.rb', line 12 def with(*args) = @method_message @block = -> (object) { object._tengu_received?(, args) } self end |