Parent

Methods

Class/Module Index [+]

Quicksearch

Mocha::ReturnValues

Attributes

values[RW]

Public Class Methods

build(*values) click to toggle source
# File lib/mocha/return_values.rb, line 7
def self.build(*values)
  new(*values.map { |value| SingleReturnValue.new(value) })
end
new(*values) click to toggle source
# File lib/mocha/return_values.rb, line 13
def initialize(*values)
  @values = values
end

Public Instance Methods

+(other) click to toggle source
# File lib/mocha/return_values.rb, line 25
def +(other)
  self.class.new(*(@values + other.values))
end
next() click to toggle source
# File lib/mocha/return_values.rb, line 17
def next
  case @values.length
    when 0 then nil
    when 1 then @values.first.evaluate
    else @values.shift.evaluate
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.