Module: Bmg::Operator::Binary

Includes:
Bmg::Operator
Included in:
Image
Defined in:
lib/bmg/operator.rb

Constant Summary

Constants included from Algebra

Algebra::METHODS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Bmg::Operator

#inspect, #to_s

Methods included from Relation

#debug, #delete, empty, #empty?, #insert, new, #one, #one_or_nil, #to_ast, #to_json, #update, #visit, #ys_by_x

Methods included from Algebra

#allbut, #autosummarize, #autowrap, #constants, #extend, #image, #project, #rename, #restrict, #spied, #union, #unspied

Instance Attribute Details

#leftObject (readonly)

Returns the value of attribute left.



42
43
44
# File 'lib/bmg/operator.rb', line 42

def left
  @left
end

#rightObject (readonly)

Returns the value of attribute right.



42
43
44
# File 'lib/bmg/operator.rb', line 42

def right
  @right
end

#typeObject (readonly)

Returns the value of attribute type.



42
43
44
# File 'lib/bmg/operator.rb', line 42

def type
  @type
end

Instance Method Details

#_visit(parent, visitor) ⇒ Object



44
45
46
47
48
# File 'lib/bmg/operator.rb', line 44

def _visit(parent, visitor)
  visitor.call(self, parent)
  left._visit(self, visitor)
  right._visit(self, visitor)
end

#operandsObject



50
51
52
# File 'lib/bmg/operator.rb', line 50

def operands
  [left, right]
end