class TPPlus::Nodes::TimeNode

Public Class Methods

new(type, time, action) click to toggle source
# File lib/tp_plus/nodes/time_node.rb, line 4
def initialize(type, time, action)
  @type = type
  @time = time
  @action = action
end

Public Instance Methods

eval(context) click to toggle source
# File lib/tp_plus/nodes/time_node.rb, line 19
def eval(context)
  "#{type} #{@time.eval(context,as_string: true)}sec,#{@action.eval(context)}"
end
type() click to toggle source
# File lib/tp_plus/nodes/time_node.rb, line 10
def type
  case @type.downcase
  when "time_before"
    "TB"
  when "time_after"
    "TA"
  end
end