Parent

Methods

Class/Module Index [+]

Quicksearch

RSpec::Mocks::AndReturnImplementation

Handles the implementation of an `and_return` implementation. @private

Public Class Methods

new(values_to_return) click to toggle source
# File lib/rspec/mocks/message_expectation.rb, line 571
def initialize(values_to_return)
  @values_to_return = values_to_return
end

Public Instance Methods

call(*args_to_ignore, &block) click to toggle source
# File lib/rspec/mocks/message_expectation.rb, line 575
def call(*args_to_ignore, &block)
  if @values_to_return.size > 1
    @values_to_return.shift
  else
    @values_to_return.first
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.