class ConceptQL::Operators::BinaryOperatorOperator

Base class for all operators that take two streams, a left-hand and a right-hand

Attributes

left[RW]

Public Instance Methods

code_list(db) click to toggle source
# File lib/conceptql/operators/binary_operator_operator.rb, line 24
def code_list(db)
  puts "BinaryOperatorOperator.code_list #{self.inspect}"
  code_lists = [left, right].map do | upstream_op |
    upstream_op.code_list(db)
  end
  code_lists.flatten(1)
end
display_name() click to toggle source
# File lib/conceptql/operators/binary_operator_operator.rb, line 20
def display_name
  self.class.name.split('::').last.snakecase.titlecase
end
upstreams() click to toggle source
# File lib/conceptql/operators/binary_operator_operator.rb, line 16
def upstreams
  [left]
end

Private Instance Methods

annotate_values(db, opts = {}) click to toggle source
# File lib/conceptql/operators/binary_operator_operator.rb, line 36
def annotate_values(db, opts = {})
  h = {}
  h[:left] = left.annotate(db, opts) if left
  h[:right] = right.annotate(db, opts) if right
  [options.merge(h), *arguments]
end
create_upstreams() click to toggle source
# File lib/conceptql/operators/binary_operator_operator.rb, line 43
def create_upstreams
  @left = to_op(options[:left]) if options[:left].is_a?(Array)
  @right = to_op(options[:right])  if options[:right].is_a?(Array)
end