Class: Sus::Receive::WithArguments
- Inherits:
-
Object
- Object
- Sus::Receive::WithArguments
- Defined in:
- lib/sus/receive.rb
Instance Method Summary collapse
- #call(assertions, subject) ⇒ Object
-
#initialize(predicate) ⇒ WithArguments
constructor
A new instance of WithArguments.
- #print(output) ⇒ Object
Constructor Details
#initialize(predicate) ⇒ WithArguments
Returns a new instance of WithArguments.
113 114 115 |
# File 'lib/sus/receive.rb', line 113 def initialize(predicate) @predicate = predicate end |
Instance Method Details
#call(assertions, subject) ⇒ Object
121 122 123 124 125 |
# File 'lib/sus/receive.rb', line 121 def call(assertions, subject) assertions.nested(self) do |assertions| @predicate.call(assertions, subject) end end |
#print(output) ⇒ Object
117 118 119 |
# File 'lib/sus/receive.rb', line 117 def print(output) output.write("with arguments ", @predicate) end |