Class: ConceptQL::GraphNodifier::BinaryOperatorNode
Constant Summary
Constants inherited
from DotNode
DotNode::TYPES
Behaviors::Dottable::TYPE_COLORS
Constants inherited
from Nodes::Node
Nodes::Node::KNOWN_TYPES
Instance Attribute Summary
Attributes inherited from DotNode
#values
Attributes inherited from Nodes::Node
#values
Instance Method Summary
collapse
Methods inherited from DotNode
#initialize
#graph_node, #link_to, #node_name, #type_color
Methods inherited from Nodes::Node
#children, #columns, #date_columns, #evaluate, #initialize, #select_it, #stream
Instance Method Details
#arguments ⇒ Object
111
112
113
|
# File 'lib/conceptql/graph_nodifier.rb', line 111
def arguments
options.values
end
|
#display_name ⇒ Object
79
80
81
82
83
|
# File 'lib/conceptql/graph_nodifier.rb', line 79
def display_name
output = name
output += "\n#{options.map{|k,v| "#{k}: #{v}"}.join("\n")}" unless options.nil? || options.empty?
output
end
|
#graph_it(g, db) ⇒ Object
93
94
95
96
97
98
99
100
101
102
103
104
105
|
# File 'lib/conceptql/graph_nodifier.rb', line 93
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
|
#left ⇒ Object
85
86
87
|
# File 'lib/conceptql/graph_nodifier.rb', line 85
def left
options[:left]
end
|
#right ⇒ Object
89
90
91
|
# File 'lib/conceptql/graph_nodifier.rb', line 89
def right
options[:right]
end
|
#types ⇒ Object
107
108
109
|
# File 'lib/conceptql/graph_nodifier.rb', line 107
def types
left.types
end
|