Class: Qrpm::ArrayNode
- Inherits:
-
ContainerNode
- Object
- Node
- ContainerNode
- Qrpm::ArrayNode
- Defined in:
- lib/qrpm/node.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Node
Instance Method Summary collapse
- #dump ⇒ Object
-
#exprs ⇒ Object
Override ContainerNode#exprs.
-
#initialize(parent, name, array = []) ⇒ ArrayNode
constructor
A new instance of ArrayNode.
-
#interpolate(dict) ⇒ Object
Array forwards #interpolate to its children.
Methods inherited from ContainerNode
#signature, #values, #variables
Methods inherited from Node
#class_name, #dot, #inspect, #interpolated?, #signature, #traverse, #variables
Constructor Details
#initialize(parent, name, array = []) ⇒ ArrayNode
Returns a new instance of ArrayNode.
340 341 342 343 |
# File 'lib/qrpm/node.rb', line 340 def initialize(parent, name, array = []) constrain array, Array super(parent, name, array.dup) end |
Instance Method Details
#dump ⇒ Object
353 354 355 356 357 358 359 360 361 362 |
# File 'lib/qrpm/node.rb', line 353 def dump puts "[" indent { expr.each { |n| print "- " n.dump } } puts "]" end |
#exprs ⇒ Object
Override ContainerNode#exprs
338 |
# File 'lib/qrpm/node.rb', line 338 def exprs() expr end |
#interpolate(dict) ⇒ Object
Array forwards #interpolate to its children
348 349 350 351 |
# File 'lib/qrpm/node.rb', line 348 def interpolate(dict) exprs.each { |e| e.interpolate(dict) } super end |