Class: Mocha::SingleYield

Inherits:
Object show all
Defined in:
lib/mocha/single_yield.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*parameters) ⇒ SingleYield


7
8
9
# File 'lib/mocha/single_yield.rb', line 7

def initialize(*parameters)
  @parameters = parameters
end

Instance Attribute Details

#parametersObject (readonly)

Returns the value of attribute parameters


5
6
7
# File 'lib/mocha/single_yield.rb', line 5

def parameters
  @parameters
end

Instance Method Details

#each {|@parameters| ... } ⇒ Object

Yields:


11
12
13
# File 'lib/mocha/single_yield.rb', line 11

def each
  yield(@parameters)
end