Sha256: cb19268a56a1dbfa9deccc462a4c1df6e0f0f538a96bed09467ce5078da686fd

Contents?: true

Size: 558 Bytes

Versions: 3

Compression:

Stored size: 558 Bytes

Contents

module Stationed
  module Generators
    module Plugins
      module Layout
        def self.prepended(base)
          base.class_option :layout,
            type: :boolean,
            default: true,
            desc: 'Add a generic Haml application layout file'
        end

        def finish_template
          return super unless options[:layout]
          remove_file 'app/views/layouts/application.html.erb'
          copy_file 'application.html.haml', 'app/views/layouts/application.html.haml'
          super
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
stationed-0.6.0 lib/stationed/generators/plugins/layout.rb
stationed-0.5.0 lib/stationed/generators/plugins/layout.rb
stationed-0.4.0 lib/stationed/generators/plugins/layout.rb