Class: Sus::Receive::WithArguments

Inherits:
Object
  • Object
show all
Defined in:
lib/sus/receive.rb

Instance Method Summary collapse

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


117
118
119
# File 'lib/sus/receive.rb', line 117

def print(output)
	output.write("with arguments ", @predicate)
end