Class: ConceptQL::Nodes::BinaryOperatorNode
- Defined in:
- lib/conceptql/nodes/binary_operator_node.rb
Overview
Base class for all nodes that take two streams, a left-hand and a right-hand
Direct Known Subclasses
Constant Summary
Constants inherited from Node
Instance Attribute Summary
Attributes inherited from Node
Instance Method Summary collapse
Methods inherited from Node
#arguments, #columns, #date_columns, #evaluate, #initialize, #select_it, #stream, #types
Constructor Details
This class inherits a constructor from ConceptQL::Nodes::Node
Instance Method Details
#children ⇒ Object
7 8 9 |
# File 'lib/conceptql/nodes/binary_operator_node.rb', line 7 def children [left] end |
#display_name ⇒ Object
25 26 27 |
# File 'lib/conceptql/nodes/binary_operator_node.rb', line 25 def display_name self.class.name.split('::').last.titleize end |
#graph_it(g, db) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/conceptql/nodes/binary_operator_node.rb', line 11 def graph_it(g, db) left.graph_it(g, db) right.graph_it(g, db) cluster_name = "cluster_#{node_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")) right.link_to(g, me.send("#{cluster_name}_right")) @__graph_node = me.send("#{cluster_name}_left") end |