Class: Tataru::Representations::ArrayRepresentation
- Inherits:
-
Tataru::Representation
- Object
- Tataru::Representation
- Tataru::Representations::ArrayRepresentation
- Defined in:
- lib/tataru/representations/array_representation.rb
Overview
representing arrays
Instance Attribute Summary
Attributes inherited from Tataru::Representation
Instance Method Summary collapse
- #dependencies ⇒ Object
-
#initialize(value) ⇒ ArrayRepresentation
constructor
A new instance of ArrayRepresentation.
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
#dependencies ⇒ Object
13 14 15 |
# File 'lib/tataru/representations/array_representation.rb', line 13 def dependencies @dependencies ||= @value.flat_map(&:dependencies) end |