Class: TPPlus::Nodes::VisionRegisterNode
- Inherits:
-
Object
- Object
- TPPlus::Nodes::VisionRegisterNode
- Defined in:
- lib/tp_plus/nodes/vision_register_node.rb
Instance Attribute Summary collapse
-
#comment ⇒ Object
Returns the value of attribute comment.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
- #comment_string ⇒ Object
- #eval(context, options = {}) ⇒ Object
-
#initialize(id) ⇒ VisionRegisterNode
constructor
A new instance of VisionRegisterNode.
Constructor Details
#initialize(id) ⇒ VisionRegisterNode
Returns a new instance of VisionRegisterNode.
6 7 8 9 |
# File 'lib/tp_plus/nodes/vision_register_node.rb', line 6 def initialize(id) @id = id @comment = "" end |
Instance Attribute Details
#comment ⇒ Object
Returns the value of attribute comment.
4 5 6 |
# File 'lib/tp_plus/nodes/vision_register_node.rb', line 4 def comment @comment end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/tp_plus/nodes/vision_register_node.rb', line 5 def id @id end |
Instance Method Details
#comment_string ⇒ Object
11 12 13 14 15 |
# File 'lib/tp_plus/nodes/vision_register_node.rb', line 11 def comment_string return "" if @comment == "" ":#{@comment}" end |
#eval(context, options = {}) ⇒ Object
17 18 19 |
# File 'lib/tp_plus/nodes/vision_register_node.rb', line 17 def eval(context,={}) "VR[#{@id}#{comment_string}]" end |