Sha256: 758a7712841d88b50b011c6272bb5401ec523944117fb64e1036d505b4bbf65e
Contents?: true
Size: 506 Bytes
Versions: 5
Compression:
Stored size: 506 Bytes
Contents
module Locomotive::Wagon class PullSectionsCommand < PullBaseCommand def _pull api_client.sections.all.each do |section| write_section(section) end end def write_section(section) write_to_file(section_filepath(section), <<-FRONT_MATTER #{section.definition.to_yaml} --- #{section.template} FRONT_MATTER ) end private def section_filepath(section) File.join('app', 'views', 'sections', section.slug + '.liquid') end end end
Version data entries
5 entries across 5 versions & 1 rubygems