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
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
-
#method_name ⇒ Object
readonly
Returns the value of attribute method_name.
-
#mock ⇒ Object
readonly
Returns the value of attribute mock.
Instance Method Summary collapse
-
#initialize(mock, method_name, arguments) ⇒ Invocation
constructor
A new instance of Invocation.
Constructor Details
#initialize(mock, method_name, arguments) ⇒ Invocation
Returns 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
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
7 8 9 |
# File 'lib/bourne/invocation.rb', line 7 def arguments @arguments end |
#method_name ⇒ Object (readonly)
Returns the value of attribute method_name.
7 8 9 |
# File 'lib/bourne/invocation.rb', line 7 def method_name @method_name end |
#mock ⇒ Object (readonly)
Returns the value of attribute mock.
7 8 9 |
# File 'lib/bourne/invocation.rb', line 7 def mock @mock end |