class Copper::LogicRightAssociated
Public Instance Methods
value(vars = {})
click to toggle source
# File lib/copper/logic_right_associated.rb, line 3 def value(vars = {}) rhs = self.parent.elements[0].value(vars) op = self.elements[0].value(vars) lhs = self.elements[1].value(vars) case op when 'and', '&', '&&' return (lhs and rhs) when 'or', '|', '||' return (lhs or rhs) end end