Class: Locomotive::Mounter::Writer::FileSystem::Runner

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

Instance Attribute Summary collapse

Attributes inherited from Runner

#kind, #mounting_point, #parameters

Instance Method Summary collapse

Methods inherited from Runner

#force?, #initialize, #run!, #write_all

Constructor Details

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

Instance Attribute Details

#target_pathObject

Returns the value of attribute target_path.



17
18
19
# File 'lib/locomotive/mounter/writer/file_system.rb', line 17

def target_path
  @target_path
end

Instance Method Details

#prepareObject

Check the existence of the target_path parameter



21
22
23
24
25
26
27
# File 'lib/locomotive/mounter/writer/file_system.rb', line 21

def prepare
  self.target_path = parameters[:target_path]

  if self.target_path.blank?
   raise Locomotive::Mounter::WriterException.new('target_path is required')
 end
end

#writersArray

List of all the writers

Returns:

  • (Array)

    List of the writer classes



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

def writers
  [SiteWriter, SnippetsWriter, ContentTypesWriter, ContentEntriesWriter, PagesWriter, ThemeAssetsWriter, ContentAssetsWriter, TranslationsWriter]
  # [SiteWriter, PagesWriter, SnippetsWriter, ContentTypesWriter, ContentEntriesWriter, ContentAssetsWriter, ThemeAssetsWriter, TranslationsWriter]
end