Sha256: 5a83f6fd69678e950336f8c0d940f453a75af507af2240fcd2c57f2cb6c78d73

Contents?: true

Size: 543 Bytes

Versions: 5

Compression:

Stored size: 543 Bytes

Contents

# frozen_string_literal: true

require_relative "./mountain_view_generator_base"

module MountainView
  module Generators
    class ExtraPagesGenerator < MountainViewGeneratorBase
      desc "Generates extra pages and routes"

      def create_extra_pages_views
        views_folder = "app/views/mountain_view/extra_pages"
        extra_pages.each do |page|
          file_name = "#{views_folder}/#{page}.html.#{template_engine}"
          next if File.exist?(file_name)
          create_file file_name
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mountain_view-0.13.0 lib/generators/mountain_view/extra_pages_generator.rb
mountain_view-0.12.3 lib/generators/mountain_view/extra_pages_generator.rb
mountain_view-0.12.2 lib/generators/mountain_view/extra_pages_generator.rb
mountain_view-0.12.1 lib/generators/mountain_view/extra_pages_generator.rb
mountain_view-0.12.0 lib/generators/mountain_view/extra_pages_generator.rb