Class: Qrpm::ContainerNode

Inherits:
Node
  • Object
show all
Defined in:
lib/qrpm/node.rb

Direct Known Subclasses

ArrayNode, HashNode

Instance Attribute Summary

Attributes inherited from Node

#expr, #name, #parent, #path

Instance Method Summary collapse

Methods inherited from Node

#class_name, #dot, #dump, #initialize, #inspect, #interpolate, #interpolated?, #traverse

Constructor Details

This class inherits a constructor from Qrpm::Node

Instance Method Details

#exprsObject

Return list of Node objects in the container. Hash keys are not included



161
# File 'lib/qrpm/node.rb', line 161

def exprs = abstract_method

#signatureObject



171
# File 'lib/qrpm/node.rb', line 171

def signature = "#{self.class_name}(#{name},#{exprs.map { |v| v.signature }.join(",")})"

#valuesObject

Can’t be defined as an alias because #exprs is redefined in derived classes, otherwise #values would refer to the derived version of #exprs



169
# File 'lib/qrpm/node.rb', line 169

def values() exprs end

#variablesObject



165
# File 'lib/qrpm/node.rb', line 165

def variables() @variables ||= exprs.map(&:variables).flatten.uniq end