Class: Proc::Callback
- Inherits:
-
Struct
- Object
- Struct
- Proc::Callback
- Defined in:
- lib/deltacloud/core_ext/proc.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
Returns the value of attribute args.
-
#called ⇒ Object
Returns the value of attribute called.
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name) ⇒ Object
22 23 24 |
# File 'lib/deltacloud/core_ext/proc.rb', line 22 def method_missing(name, *) name == :"#{called}?" || (name == called && block_given? && yield(*args)) end |
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args
21 22 23 |
# File 'lib/deltacloud/core_ext/proc.rb', line 21 def args @args end |
#called ⇒ Object
Returns the value of attribute called
21 22 23 |
# File 'lib/deltacloud/core_ext/proc.rb', line 21 def called @called end |