Class: Sus::Receive::WithOptions

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

Instance Method Summary collapse

Constructor Details

#initialize(predicate) ⇒ WithOptions

Returns a new instance of WithOptions.



129
130
131
# File 'lib/sus/receive.rb', line 129

def initialize(predicate)
	@predicate = predicate
end

Instance Method Details

#call(assertions, subject) ⇒ Object



137
138
139
140
141
# File 'lib/sus/receive.rb', line 137

def call(assertions, subject)
	assertions.nested(self) do |assertions|
		@predicate.call(assertions, subject)
	end
end


133
134
135
# File 'lib/sus/receive.rb', line 133

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