Class: Iba::InstanceVariableExpression

Inherits:
DisplayableExpression show all
Defined in:
lib/iba.rb

Instance Method Summary collapse

Methods inherited from DisplayableExpression

#_display

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_sObject



160
161
162
# File 'lib/iba.rb', line 160

def _to_s
  @_ivar_name.to_s
end