Class: Ea::Ocl::Evaluator::VarBinding
- Inherits:
-
Struct
- Object
- Struct
- Ea::Ocl::Evaluator::VarBinding
- Defined in:
- lib/ea/ocl/evaluator.rb
Overview
Bind a variable name in the evaluation context. Uses a small Struct wrapper so attribute lookups still fall through to the original context.
Instance Attribute Summary collapse
-
#context ⇒ Object
Returns the value of attribute context.
-
#value ⇒ Object
Returns the value of attribute value.
-
#var_name ⇒ Object
Returns the value of attribute var_name.
Instance Method Summary collapse
Instance Attribute Details
#context ⇒ Object
Returns the value of attribute context
81 82 83 |
# File 'lib/ea/ocl/evaluator.rb', line 81 def context @context end |
#value ⇒ Object
Returns the value of attribute value
81 82 83 |
# File 'lib/ea/ocl/evaluator.rb', line 81 def value @value end |
#var_name ⇒ Object
Returns the value of attribute var_name
81 82 83 |
# File 'lib/ea/ocl/evaluator.rb', line 81 def var_name @var_name end |
Instance Method Details
#public_send(method_name, *args) ⇒ Object
82 83 84 85 86 |
# File 'lib/ea/ocl/evaluator.rb', line 82 def public_send(method_name, *args) return value if method_name == var_name context.public_send(method_name, *args) end |