class Babl::Nodes::FixedArray

Constants

EMPTY

Public Instance Methods

dependencies() click to toggle source
# File lib/babl/nodes/fixed_array.rb, line 15
        def dependencies
    Babl::Utils::Hash.deep_merge(nodes.map(&:dependencies))
end
optimize() click to toggle source
# File lib/babl/nodes/fixed_array.rb, line 23
        def optimize
    optimized_nodes = nodes.map(&:optimize)

    fixed_array = self if optimized_nodes.each_with_index.all? { |v, idx| v.equal?(nodes[idx]) }
    fixed_array ||= FixedArray.new(optimized_nodes)

    if optimized_nodes.all? { |node| Constant === node }
        Constant.new(optimized_nodes.map(&:value).freeze, fixed_array.schema)
    else
        fixed_array
    end
end
pinned_dependencies() click to toggle source
# File lib/babl/nodes/fixed_array.rb, line 19
        def pinned_dependencies
    Babl::Utils::Hash.deep_merge(nodes.map(&:pinned_dependencies))
end
render(frame) click to toggle source
# File lib/babl/nodes/fixed_array.rb, line 36
def render(frame)
    nodes.map { |node| node.render(frame) }
end
schema() click to toggle source
# File lib/babl/nodes/fixed_array.rb, line 11
        def schema
    Schema::FixedArray.new(nodes.map(&:schema))
end