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.
5 6 7 8 9 |
# File 'lib/much-stub/call.rb', line 5 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.
3 4 5 |
# File 'lib/much-stub/call.rb', line 3 def block @block end |
#kargs ⇒ Object (readonly)
Returns the value of attribute kargs.
3 4 5 |
# File 'lib/much-stub/call.rb', line 3 def kargs @kargs end |
#pargs ⇒ Object (readonly)
Returns the value of attribute pargs.
3 4 5 |
# File 'lib/much-stub/call.rb', line 3 def pargs @pargs end |
Instance Method Details
#args ⇒ Object
11 12 13 |
# File 'lib/much-stub/call.rb', line 11 def args @args ||= [*pargs, kargs].compact end |