Class: MuchStub::Call
- Inherits:
-
Object
- Object
- MuchStub::Call
- Defined in:
- lib/much-stub/call.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#kargs ⇒ Object
readonly
Returns the value of attribute kargs.
-
#pargs ⇒ Object
readonly
Returns the value of attribute pargs.
Instance Method Summary collapse
- #args ⇒ Object
-
#initialize(*pargs, **kargs, &block) ⇒ Call
constructor
A new instance of Call.
Constructor Details
#initialize(*pargs, **kargs, &block) ⇒ Call
Returns a new instance of Call.
7 8 9 10 11 |
# File 'lib/much-stub/call.rb', line 7 def initialize(*pargs, **kargs, &block) @pargs = pargs.empty? ? nil : pargs @kargs = kargs.empty? ? nil : kargs @block = block end |
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
5 6 7 |
# File 'lib/much-stub/call.rb', line 5 def block @block end |
#kargs ⇒ Object (readonly)
Returns the value of attribute kargs.
5 6 7 |
# File 'lib/much-stub/call.rb', line 5 def kargs @kargs end |
#pargs ⇒ Object (readonly)
Returns the value of attribute pargs.
5 6 7 |
# File 'lib/much-stub/call.rb', line 5 def pargs @pargs end |
Instance Method Details
#args ⇒ Object
13 14 15 |
# File 'lib/much-stub/call.rb', line 13 def args @args ||= [*pargs, kargs].compact end |