class Mocha::YieldParameters
Public Class Methods
new()
click to toggle source
# File lib/mocha/yield_parameters.rb, line 9 def initialize @parameter_groups = [] end
Public Instance Methods
add(*parameters)
click to toggle source
# File lib/mocha/yield_parameters.rb, line 21 def add(*parameters) @parameter_groups << SingleYield.new(*parameters) end
multiple_add(*parameter_groups)
click to toggle source
# File lib/mocha/yield_parameters.rb, line 25 def multiple_add(*parameter_groups) @parameter_groups << MultipleYields.new(*parameter_groups) end
next_invocation()
click to toggle source
# File lib/mocha/yield_parameters.rb, line 13 def next_invocation case @parameter_groups.length when 0 then NoYields.new when 1 then @parameter_groups.first else @parameter_groups.shift end end