Class: Locomotive::Mounter::Reader::Api::TranslationsReader
- Defined in:
- lib/locomotive/mounter/reader/api/translations_reader.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#read ⇒ Array
Build the list of translations.
Methods inherited from Base
#add_content_asset, #get, #initialize, #mounting_point
Constructor Details
This class inherits a constructor from Locomotive::Mounter::Reader::Api::Base
Instance Method Details
#read ⇒ Array
Build the list of translations
12 13 14 15 16 17 18 |
# File 'lib/locomotive/mounter/reader/api/translations_reader.rb', line 12 def read super self.items = get(:translations).each_with_object({}) do |attributes,hash| hash[attributes['key']] = Locomotive::Mounter::Models::Translation.new(attributes) end end |