Class: RSpec::SleepingKingStudios::Deferred::Call
- Parent Namespace
- RSpec::SleepingKingStudios::Deferred
- Defined In
- lib/rspec/sleeping_king_studios/deferred/call.rb
Table Of Contents
Overview
Value object representing a deferred call to a method.
Back To Top
Direct Subclasses
RSpec::SleepingKingStudios::Deferred::Calls::Example, RSpec::SleepingKingStudios::Deferred::Calls::ExampleGroup, RSpec::SleepingKingStudios::Deferred::Calls::Hook, RSpec::SleepingKingStudios::Deferred::Calls::IncludedExamples, RSpec::SleepingKingStudios::Deferred::Calls::SharedExamples
Back To Top
Constructor
#initialize(method_name, *arguments, **keywords, &block) => Call
Parameters
- method_name (String, Symbol) — the name of the method to call.
- arguments (Array) — the arguments to pass to the method.
- keywords (Hash) — the keywords to pass to the method.
- block (Proc) — the block to pass to the method.
Returns
- (Call) — a new instance of Call
Back To Top
Instance Attributes
#arguments => Array (readonly)
Returns
- (Array) — the arguments to pass to the method.
#block => Proc (readonly)
Returns
- (Proc) — the block to pass to the method.
#keywords => Hash (readonly)
Returns
- (Hash) — the keywords to pass to the method.
#method_name => String, Symbol (readonly)
Returns
- (String, Symbol) — the name of the method to call.
Back To Top
Instance Methods
#==(other) => Boolean
Compares the other object with the deferred call.
Returns true if and only if:
- The other object is an instance of Deferred::Call.
- The other object’s method name and type match the deferred call.
- The other object’s arguments, keywords, and block all match the deferred
call.
Parameters
- other (Object) — the object to compare.
Returns
- (Boolean) — true if the other matches the deferred call; otherwise
false.
#call(receiver) => Object
Invokes the deferred method call on the receiver.
Parameters
- receiver (Object) — the receiver for the method call.
Returns
- (Object) — the returned value of the method call.
Back To Top
Back to
Documentation |
Versions |
2.8.1 |
Reference
|
RSpec
|
RSpec::SleepingKingStudios
|
RSpec::SleepingKingStudios::Deferred