Sha256: a4cbeff4fafdfe92265c28e0dcad260fd8cc1edda46a0fbbd336577182dd0d64

Contents?: true

Size: 391 Bytes

Versions: 1

Compression:

Stored size: 391 Bytes

Contents

# frozen_string_literal: true

module Tataru
  module Representations
    # representing arrays
    class ArrayRepresentation < Representation
      def initialize(value)
        @value = value.map do |thing|
          Resolver.new(thing).representation
        end.to_a
      end

      def dependencies
        @dependencies ||= @value.flat_map(&:dependencies)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tataru-0.2.0 lib/tataru/representations/array_representation.rb