Class: Locomotive::Mounter::Writer::FileSystem::SiteWriter
- Defined in:
- lib/locomotive/mounter/writer/file_system/site_writer.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#prepare ⇒ Object
It creates the config folder.
-
#write ⇒ Object
It fills the config/site.yml file.
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
#prepare ⇒ Object
It creates the config folder
9 10 11 12 |
# File 'lib/locomotive/mounter/writer/file_system/site_writer.rb', line 9 def prepare super self.create_folder 'config' end |
#write ⇒ Object
It fills the config/site.yml file
15 16 17 18 19 20 21 22 23 |
# File 'lib/locomotive/mounter/writer/file_system/site_writer.rb', line 15 def write self.open_file('config/site.yml') do |file| self.output_resource_op self.mounting_point.site file.write(self.mounting_point.site.to_yaml) self.output_resource_op_status self.mounting_point.site end end |