Class: Ludy::Variable
- Inherits:
-
Object
- Object
- Ludy::Variable
- Defined in:
- lib/ludy/variable.rb
Overview
a variable reference, used for side effect…
Instance Attribute Summary collapse
-
#__obj__ ⇒ Object
Returns the value of attribute __obj__.
Instance Method Summary collapse
-
#initialize(obj) ⇒ Variable
constructor
init the refered instance.
-
#method_missing(msg, *arg, &block) ⇒ Object
delegator.
Constructor Details
#initialize(obj) ⇒ Variable
init the refered instance
12 13 14 |
# File 'lib/ludy/variable.rb', line 12 def initialize obj @__obj__ = obj end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(msg, *arg, &block) ⇒ Object
delegator
17 18 19 |
# File 'lib/ludy/variable.rb', line 17 def method_missing msg, *arg, &block @__obj__.public_send msg, *arg, &block end |
Instance Attribute Details
#__obj__ ⇒ Object
Returns the value of attribute __obj__.
21 22 23 |
# File 'lib/ludy/variable.rb', line 21 def __obj__ @__obj__ end |