class TPPlus::Nodes::IndirectNode
Public Class Methods
new(type, target)
click to toggle source
# File lib/tp_plus/nodes/indirect_node.rb, line 4 def initialize(type, target) @type = type @target = target end
Public Instance Methods
eval(context,options={})
click to toggle source
# File lib/tp_plus/nodes/indirect_node.rb, line 15 def eval(context,options={}) s = "#{@type.upcase}[#{@target.eval(context)}]" if options[:opposite] s = "!#{s}" end if options[:as_condition] s = "(#{s})" end s end
requires_mixed_logic?(context)
click to toggle source
# File lib/tp_plus/nodes/indirect_node.rb, line 9 def requires_mixed_logic?(context) return true if @type == :f false end