Class: Bool::And

Inherits:
Object
  • Object
show all
Defined in:
lib/bool/ast.rb,
ext/bool_ext/ext.c

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(left, right) ⇒ And

Returns a new instance of And.



20
21
22
# File 'lib/bool/ast.rb', line 20

def initialize(left, right)
  @left, @right = left, right
end

Instance Attribute Details

#leftObject (readonly)

Returns the value of attribute left.



18
19
20
# File 'lib/bool/ast.rb', line 18

def left
  @left
end

#rightObject (readonly)

Returns the value of attribute right.



18
19
20
# File 'lib/bool/ast.rb', line 18

def right
  @right
end

Instance Method Details

#describe_to(visitor, arg) ⇒ Object



24
25
26
# File 'lib/bool/ast.rb', line 24

def describe_to(visitor, arg)
  visitor.and(self, arg)
end