Class: NegativeFieldPropertyNode
- Inherits:
-
FieldPropertyNode
- Object
- ASTNode
- FieldPropertyNode
- NegativeFieldPropertyNode
- Defined in:
- lib/ast_node.rb
Constant Summary
Constants inherited from ASTNode
ASTNode::DEFAULT_GRAPH_PROPERTIES, ASTNode::METRIC_PROC_FUNCTIONS
Instance Attribute Summary
Attributes inherited from FieldPropertyNode
Attributes inherited from ASTNode
#children, #graph_properties, #parent, #properties, #root_node
Instance Method Summary collapse
Methods inherited from FieldPropertyNode
Methods inherited from ASTNode
#add_child, #children_of_class, #compile, #config=, #default_colors, #initialize, #process_variables, #properties_to_url, #root?, #targets, #to_gdash, #url
Constructor Details
This class inherits a constructor from FieldPropertyNode
Instance Method Details
#apply_function(operand) ⇒ Object
373 374 375 376 377 378 379 380 381 382 383 384 |
# File 'lib/ast_node.rb', line 373 def apply_function(operand) # We have to mark the other node as negative (note that for this to work we have to compile twice node = self.root_node.targets.find { |i| i.properties[:field_name] == @value } if node node.properties[:is_negative] = true # We also use the same color # config.log.info("Begin getting metrics negative (node : #{node.index} with : #{parent.index} parent Color = root_node.graph_properties[:colorList][parent.index] ") root_node.graph_properties[:colorList][node.index] = root_node.graph_properties[:colorList][parent.index] if root_node.graph_properties[:colorList][parent.index] end return operand end |