Class: TPPlus::Nodes::TimerNode

Inherits:
Object
  • Object
show all
Defined in:
lib/tp_plus/nodes/timer_node.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id) ⇒ TimerNode

Returns a new instance of TimerNode.



6
7
8
9
# File 'lib/tp_plus/nodes/timer_node.rb', line 6

def initialize(id)
  @id = id
  @comment = ""
end

Instance Attribute Details

#commentObject

Returns the value of attribute comment.



4
5
6
# File 'lib/tp_plus/nodes/timer_node.rb', line 4

def comment
  @comment
end

#idObject (readonly)

Returns the value of attribute id.



5
6
7
# File 'lib/tp_plus/nodes/timer_node.rb', line 5

def id
  @id
end

Instance Method Details

#eval(context, options = {}) ⇒ Object



11
12
13
# File 'lib/tp_plus/nodes/timer_node.rb', line 11

def eval(context, options={})
  "TIMER[#{@id}]" # FANUC does not like timer comments
end