Class: Rbjs::ArgumentProxy
- Inherits:
-
Object
- Object
- Rbjs::ArgumentProxy
- Defined in:
- lib/rbjs.rb
Instance Method Summary collapse
-
#initialize(root, name) ⇒ ArgumentProxy
constructor
A new instance of ArgumentProxy.
- #method_missing(name, *args, &block) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(root, name) ⇒ ArgumentProxy
Returns a new instance of ArgumentProxy.
139 140 141 142 |
# File 'lib/rbjs.rb', line 139 def initialize root, name @root = root @name = name end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
144 145 146 147 |
# File 'lib/rbjs.rb', line 144 def method_missing name, *args, &block expression = @root.send(@name) expression.send name, *args, &block end |
Instance Method Details
#to_s ⇒ Object
149 150 151 |
# File 'lib/rbjs.rb', line 149 def to_s @name end |