Class: FieldPropertyNode
Direct Known Subclasses
CDefFieldPropertyNode, ColourFieldPropertyNode, CriticalFieldPropertyNode, DrawFieldPropertyNode, ExtInfoFieldPropertyNode, GraphFieldPropertyNode, InfoFieldPropertyNode, LabelFieldPropertyNode, LineValueFieldPropertyNode, MaxFieldPropertyNode, MinFieldPropertyNode, NegativeFieldPropertyNode, OldNameFieldPropertyNode, SkipDrawFieldPropertyNode, StackFieldPropertyNode, SumFieldPropertyNode, TypeFieldPropertyNode, ValueFieldPropertyNode, WarningFieldPropertyNode
Constant Summary
Constants inherited from ASTNode
ASTNode::DEFAULT_GRAPH_PROPERTIES, ASTNode::METRIC_PROC_FUNCTIONS
Instance Attribute Summary collapse
-
#metric ⇒ Object
Returns the value of attribute metric.
Attributes inherited from ASTNode
#children, #graph_properties, #parent, #properties, #root_node
Instance Method Summary collapse
- #apply_function(operand) ⇒ Object
-
#initialize(line) ⇒ FieldPropertyNode
constructor
A new instance of FieldPropertyNode.
Methods inherited from ASTNode
#add_child, #children_of_class, #compile, #config=, #default_colors, #process_variables, #properties_to_url, #root?, #targets, #to_gdash, #url
Constructor Details
#initialize(line) ⇒ FieldPropertyNode
Returns a new instance of FieldPropertyNode.
255 256 257 258 259 260 261 |
# File 'lib/ast_node.rb', line 255 def initialize(line) super line =~ /([\w_]+)\.(\w+)\ (.*)$/ @metric = $1 @function = $2 @value = $3 end |
Instance Attribute Details
#metric ⇒ Object
Returns the value of attribute metric.
253 254 255 |
# File 'lib/ast_node.rb', line 253 def metric @metric end |
Instance Method Details
#apply_function(operand) ⇒ Object
263 264 265 |
# File 'lib/ast_node.rb', line 263 def apply_function(operand) return "FUNCION(#{operand})" end |