Class: Iba::InstanceVariableExpression
- Inherits:
-
DisplayableExpression
- Object
- BaseExpression
- DisplayableExpression
- Iba::InstanceVariableExpression
- Defined in:
- lib/iba.rb
Instance Method Summary collapse
- #_evaluate(bnd) ⇒ Object
- #_to_s ⇒ Object
-
#initialize(ivar_name) ⇒ InstanceVariableExpression
constructor
A new instance of InstanceVariableExpression.
Methods inherited from DisplayableExpression
Methods inherited from BaseExpression
#!=, #==, #_display, #_display_subexpressions, #_wrap, #coerce, #method_missing, #respond_to_missing?, #to_s
Constructor Details
#initialize(ivar_name) ⇒ InstanceVariableExpression
Returns a new instance of InstanceVariableExpression.
155 156 157 158 |
# File 'lib/iba.rb', line 155 def initialize(ivar_name) super() @_ivar_name = ivar_name end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Iba::BaseExpression
Instance Method Details
#_evaluate(bnd) ⇒ Object
164 165 166 |
# File 'lib/iba.rb', line 164 def _evaluate(bnd) bnd.receiver.instance_variable_get @_ivar_name end |
#_to_s ⇒ Object
160 161 162 |
# File 'lib/iba.rb', line 160 def _to_s @_ivar_name.to_s end |