Class: Babl::Operators::Array::FixedArrayNode

Inherits:
Object
  • Object
show all
Defined in:
lib/babl/operators/array.rb

Instance Method Summary collapse

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

#dependenciesObject



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

#documentationObject



20
21
22
# File 'lib/babl/operators/array.rb', line 20

def documentation
    nodes.map(&:documentation)
end

#pinned_dependenciesObject



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