Class: ConceptQL::Operators::BinaryOperatorOperator
- Defined in:
- lib/conceptql/operators/binary_operator_operator.rb
Overview
Base class for all operators that take two streams, a left-hand and a right-hand
Direct Known Subclasses
Constant Summary
Constants inherited from Operator
Instance Attribute Summary
Attributes inherited from Operator
Instance Method Summary collapse
Methods inherited from Operator
#columns, #evaluate, #initialize, #label, #select_it, #set_values, #sql, #stream, #types
Methods included from Metadatable
#allows_many_upstreams, #allows_one_upstream, #argument, #category, #desc, #humanized_class_name, #inherited, #just_class_name, #option, #predominant_types, #preferred_name, #reset_categories, #to_metadata, #types
Constructor Details
This class inherits a constructor from ConceptQL::Operators::Operator
Instance Method Details
#display_name ⇒ Object
29 30 31 |
# File 'lib/conceptql/operators/binary_operator_operator.rb', line 29 def display_name self.class.name.split('::').last.snakecase.titlecase end |
#graph_it(g, db) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/conceptql/operators/binary_operator_operator.rb', line 15 def graph_it(g, db) left.graph_it(g, db) right.graph_it(g, db) cluster_name = "cluster_#{operator_name}" me = g.send(cluster_name) do |sub| sub[rank: 'same', label: display_name, color: 'black'] sub.send("#{cluster_name}_left").send('[]', shape: 'point', color: type_color(types)) sub.send("#{cluster_name}_right").send('[]', shape: 'point') end left.link_to(g, me.send("#{cluster_name}_left"), db) right.link_to(g, me.send("#{cluster_name}_right"), db) @__graph_operator = me.send("#{cluster_name}_left") end |
#upstreams ⇒ Object
11 12 13 |
# File 'lib/conceptql/operators/binary_operator_operator.rb', line 11 def upstreams [left] end |