Method: RSpec::Mocks::VerifyingMessageExpectation#method_reference
- Defined in:
- lib/rspec/mocks/verifying_message_expectation.rb
#method_reference ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
A level of indirection is used here rather than just passing in the method itself, since method look up is expensive and we only want to do it if actually needed.
Conceptually the method reference makes more sense as a constructor argument since it should be immutable, but it is significantly more straight forward to build the object in pieces so for now it stays as an accessor.
18 19 20 |
# File 'lib/rspec/mocks/verifying_message_expectation.rb', line 18 def method_reference @method_reference end |