Class: Mspec::Mocks::Stub

Inherits:
Object
  • Object
show all
Defined in:
lib/m-spec/mocks/stub.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, return_value) ⇒ Stub

Returns a new instance of Stub.



6
7
8
9
# File 'lib/m-spec/mocks/stub.rb', line 6

def initialize(name, return_value)
  @name = name
  @return_value = return_value
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/m-spec/mocks/stub.rb', line 4

def name
  @name
end

#return_valueObject (readonly)

Returns the value of attribute return_value.



4
5
6
# File 'lib/m-spec/mocks/stub.rb', line 4

def return_value
  @return_value
end