Class: Locomotive::Mounter::Reader::Api::PagesReader
- Defined in:
- lib/locomotive/mounter/reader/api/pages_reader.rb
Instance Attribute Summary collapse
-
#pages ⇒ Object
Returns the value of attribute pages.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(runner) ⇒ PagesReader
constructor
A new instance of PagesReader.
-
#read ⇒ Hash
Build the tree of pages based on the filesystem structure.
Methods inherited from Base
#add_content_asset, #get, #mounting_point
Constructor Details
#initialize(runner) ⇒ PagesReader
Returns a new instance of PagesReader.
10 11 12 13 |
# File 'lib/locomotive/mounter/reader/api/pages_reader.rb', line 10 def initialize(runner) self.pages = {} super end |
Instance Attribute Details
#pages ⇒ Object
Returns the value of attribute pages.
8 9 10 |
# File 'lib/locomotive/mounter/reader/api/pages_reader.rb', line 8 def pages @pages end |
Instance Method Details
#read ⇒ Hash
Build the tree of pages based on the filesystem structure
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/locomotive/mounter/reader/api/pages_reader.rb', line 19 def read super self.fetch index = self.pages['index'] self.build_relationships(index, self.pages_to_list) # Locomotive::Mounter.with_locale(:en) { self.to_s } # DEBUG # self.to_s self.pages end |