Class: Tataru::Representations::ArrayRepresentation

Inherits:
Tataru::Representation show all
Defined in:
lib/tataru/representations/array_representation.rb

Overview

representing arrays

Instance Attribute Summary

Attributes inherited from Tataru::Representation

#value

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ ArrayRepresentation

Returns a new instance of ArrayRepresentation.



7
8
9
10
11
# File 'lib/tataru/representations/array_representation.rb', line 7

def initialize(value)
  @value = value.map do |thing|
    Resolver.new(thing).representation
  end.to_a
end

Instance Method Details

#dependenciesObject



13
14
15
# File 'lib/tataru/representations/array_representation.rb', line 13

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