Class: Babl::Operators::Array::FixedArrayNode
- Inherits:
-
Object
- Object
- Babl::Operators::Array::FixedArrayNode
- Defined in:
- lib/babl/operators/array.rb
Instance Method Summary collapse
- #dependencies ⇒ Object
- #documentation ⇒ Object
-
#initialize(nodes) ⇒ FixedArrayNode
constructor
A new instance of FixedArrayNode.
- #pinned_dependencies ⇒ Object
- #render(ctx) ⇒ Object
Constructor Details
#initialize(nodes) ⇒ FixedArrayNode
Returns a new instance of FixedArrayNode.
16 17 18 |
# File 'lib/babl/operators/array.rb', line 16 def initialize(nodes) @nodes = nodes end |
Instance Method Details
#dependencies ⇒ Object
24 25 26 |
# File 'lib/babl/operators/array.rb', line 24 def dependencies nodes.map(&:dependencies).reduce({}) { |a, b| Babl::Utils::Hash.deep_merge(a, b) } end |
#documentation ⇒ Object
20 21 22 |
# File 'lib/babl/operators/array.rb', line 20 def documentation nodes.map(&:documentation) end |
#pinned_dependencies ⇒ Object
28 29 30 |
# File 'lib/babl/operators/array.rb', line 28 def pinned_dependencies nodes.map(&:pinned_dependencies).reduce({}) { |a, b| Babl::Utils::Hash.deep_merge(a, b) } end |
#render(ctx) ⇒ Object
32 33 34 |
# File 'lib/babl/operators/array.rb', line 32 def render(ctx) nodes.map { |node| node.render(ctx) } end |