Sha256: 38fb37181c65dcca20663a75c205f7ace1fa55fbffea4c990c249a926426ef08

Contents?: true

Size: 753 Bytes

Versions: 28

Compression:

Stored size: 753 Bytes

Contents

module Merb::Generators
  
  class LayoutGenerator < NamedGenerator

    def self.source_root
      File.join(super, 'component', 'layout')
    end
    
    desc <<-DESC
      Generates a new 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

28 entries across 28 versions & 1 rubygems

Version Path
merb-gen-1.1.3 lib/generators/layout.rb
merb-gen-1.1.2 lib/generators/layout.rb
merb-gen-1.1.1 lib/generators/layout.rb
merb-gen-1.1.0 lib/generators/layout.rb
merb-gen-1.1.0.rc1 lib/generators/layout.rb
merb-gen-1.1.0.pre lib/generators/layout.rb
merb-gen-1.0.15 lib/generators/layout.rb
merb-gen-1.0.14 lib/generators/layout.rb
merb-gen-1.0.13 lib/generators/layout.rb
merb-gen-1.0.12 lib/generators/layout.rb
merb-gen-0.9.11 lib/generators/layout.rb
merb-gen-0.9.13 lib/generators/layout.rb
merb-gen-0.9.12 lib/generators/layout.rb
merb-gen-1.0.10 lib/generators/layout.rb
merb-gen-1.0.1 lib/generators/layout.rb
merb-gen-1.0.11 lib/generators/layout.rb
merb-gen-1.0.2 lib/generators/layout.rb
merb-gen-1.0.5 lib/generators/layout.rb
merb-gen-1.0.3 lib/generators/layout.rb
merb-gen-1.0.4 lib/generators/layout.rb