Class: ColourFieldPropertyNode

Inherits:
FieldPropertyNode show all
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

#metric

Attributes inherited from ASTNode

#children, #graph_properties, #parent, #properties, #root_node

Instance Method Summary collapse

Methods inherited from FieldPropertyNode

#initialize

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



278
279
280
281
282
283
284
285
286
287
# File 'lib/ast_node.rb', line 278

def apply_function(operand)
  # In this case a function can't be applied cause graphite does not allow this
  # instead we modify a given
  aux = @value  
  aux = "##{@value}"   if @value =~ /[0-9A-Fa-f]{3,6}/
  
  self.root_node.graph_properties[:colorList] ||= Array.new
  self.root_node.graph_properties[:colorList][parent.index] = aux
  return operand
end