Class: Locomotive::Mounter::Writer::FileSystem::PagesWriter

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

Instance Attribute Summary

Attributes inherited from Base

#mounting_point, #runner

Instance Method Summary collapse

Methods inherited from Base

#create_folder, #initialize, #open_file, #target_path

Constructor Details

This class inherits a constructor from Locomotive::Mounter::Writer::FileSystem::Base

Instance Method Details

#prepareObject

It creates the pages folder



9
10
11
12
# File 'lib/locomotive/mounter/writer/file_system/pages_writer.rb', line 9

def prepare
  super
  self.create_folder 'app/views/pages'
end

#writeObject

It writes all the pages into files



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

def write
  self.write_page(self.mounting_point.pages['index'])

  self.write_page(self.mounting_point.pages['404'])
end