class Dry::Logic::Operations::Binary

Attributes

left[R]
right[R]

Public Class Methods

new(left, right, **options) click to toggle source
Calls superclass method Dry::Logic::Operations::Abstract::new
# File lib/dry/logic/operations/binary.rb, line 11
def initialize(left, right, **options)
  super
  @left = left
  @right = right
end

Public Instance Methods

ast(input = Undefined) click to toggle source
# File lib/dry/logic/operations/binary.rb, line 17
def ast(input = Undefined)
  [type, [left.ast(input), right.ast(input)]]
end
to_s() click to toggle source
# File lib/dry/logic/operations/binary.rb, line 21
def to_s
  "#{left} #{operator.to_s.upcase} #{right}"
end