class Namarara::OrOp

Attributes

errors[R]

Public Class Methods

new(lval, rval) click to toggle source
# File lib/namarara/parser.rb, line 123
def initialize(lval, rval)
  @errors = []
  @errors.concat lval.errors
  @errors.concat rval.errors
  @lval = lval
  @rval = rval
end

Public Instance Methods

compute() click to toggle source
# File lib/namarara/parser.rb, line 131
def compute
  # rubocop:disable Style/DoubleNegation
  !!@lval.compute || !!@rval.compute
  # rubocop:enable Style/DoubleNegation
end
to_s() click to toggle source
# File lib/namarara/parser.rb, line 137
def to_s
  "( #{@lval} ) OR ( #{@rval} )"
end