Class: Mocha::Invocation
- Inherits:
-
Object
- Object
- Mocha::Invocation
- Defined in:
- lib/bourne/invocation.rb
Overview
Used internally by Bourne extensions to Mocha. Represents a single invocation of a stubbed or mocked method. The mock, method name, and arguments are recorded and can be used to determine how a method was invoked.
Instance Attribute Summary (collapse)
-
- (Object) arguments
readonly
Returns the value of attribute arguments.
-
- (Object) method_name
readonly
Returns the value of attribute method_name.
-
- (Object) mock
readonly
Returns the value of attribute mock.
Instance Method Summary (collapse)
-
- (Invocation) initialize(mock, method_name, arguments)
constructor
A new instance of Invocation.
Constructor Details
- (Invocation) initialize(mock, method_name, arguments)
A new instance of Invocation
8 9 10 11 12 |
# File 'lib/bourne/invocation.rb', line 8 def initialize(mock, method_name, arguments) @mock = mock @method_name = method_name @arguments = arguments end |
Instance Attribute Details
- (Object) arguments (readonly)
Returns the value of attribute arguments
7 8 9 |
# File 'lib/bourne/invocation.rb', line 7 def arguments @arguments end |
- (Object) method_name (readonly)
Returns the value of attribute method_name
7 8 9 |
# File 'lib/bourne/invocation.rb', line 7 def method_name @method_name end |
- (Object) mock (readonly)
Returns the value of attribute mock
7 8 9 |
# File 'lib/bourne/invocation.rb', line 7 def mock @mock end |