Class: TPPlus::Nodes::UseNode
- Inherits:
-
Object
- Object
- TPPlus::Nodes::UseNode
- Defined in:
- lib/tp_plus/nodes/use_node.rb
Instance Method Summary collapse
- #eval(context) ⇒ Object
-
#initialize(type, value) ⇒ UseNode
constructor
A new instance of UseNode.
Constructor Details
#initialize(type, value) ⇒ UseNode
Returns a new instance of UseNode.
4 5 6 7 |
# File 'lib/tp_plus/nodes/use_node.rb', line 4 def initialize(type, value) @type = type @value = value end |
Instance Method Details
#eval(context) ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/tp_plus/nodes/use_node.rb', line 9 def eval(context) case @type when "use_uframe" "UFRAME_NUM=#{@value.eval(context)}" when "use_utool" "UTOOL_NUM=#{@value.eval(context)}" when "use_payload" "PAYLOAD[#{@value.eval(context)}]" end end |