Sha256: 3cc3f32717a0c3701e29b549c366f03633e3fe82e4334d8b36a0dc869276c7eb

Contents?: true

Size: 748 Bytes

Versions: 5

Compression:

Stored size: 748 Bytes

Contents

module Merb::Generators
  
  class LayoutGenerator < NamedGenerator

    def self.source_root
      File.join(super, 'component', 'layout')
    end
    
    desc <<-DESC
      Generates a layout
    DESC
    
    #option :testing_framework, :desc => 'Testing framework to use (one of: rspec, test_unit)'
    option :template_engine, :desc => 'Specify what template engine should be used (one of: erb, haml...)'
    
    first_argument :name, :required => true, :desc => "layout name"
    
    template :layout_erb, :template_engine => :erb do |template|
      template.source = 'app/views/layout/%file_name%.html.erb'
      template.destination = "app/views/layout/#{file_name}.html.erb"
    end
    
  end
  
  add :layout, LayoutGenerator
  
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
merb-gen-0.9.10 lib/generators/layout.rb
merb-gen-0.9.6 lib/generators/layout.rb
merb-gen-0.9.9 lib/generators/layout.rb
merb-gen-0.9.7 lib/generators/layout.rb
merb-gen-0.9.8 lib/generators/layout.rb