Class: Locomotive::Mounter::Reader::FileSystem::Runner

Inherits:
Runner
  • Object
show all
Defined in:
lib/locomotive/mounter/reader/file_system.rb

Instance Attribute Summary collapse

Attributes inherited from Runner

#kind, #mounting_point, #parameters

Instance Method Summary collapse

Methods inherited from Runner

#initialize, #reload, #run!

Constructor Details

This class inherits a constructor from Locomotive::Mounter::Reader::Runner

Instance Attribute Details

#pathObject

Returns the value of attribute path.



16
17
18
# File 'lib/locomotive/mounter/reader/file_system.rb', line 16

def path
  @path
end

Instance Method Details

#prepareObject

Compass is required



19
20
21
22
23
24
25
26
27
28
# File 'lib/locomotive/mounter/reader/file_system.rb', line 19

def prepare
  self.path = parameters.delete(:path)

  if self.path.blank? || !File.exists?(self.path)
    raise Locomotive::Mounter::ReaderException.new('path is required and must exist')
  end

  # TODO: Steam should deal with that
  Locomotive::Mounter::Extensions::Compass.configure(self.path)
end

#readersArray

Ordered list of atomic readers

Returns:

  • (Array)

    List of classes



34
35
36
# File 'lib/locomotive/mounter/reader/file_system.rb', line 34

def readers
  [SiteReader, ContentTypesReader, PagesReader, SnippetsReader, ContentEntriesReader, ContentAssetsReader, ThemeAssetsReader, TranslationsReader]
end