Sha256: 1f4de10ba1eea846cc7c60178017073ef9e7c19c0de3fbb1ceaf24e74fc96a56

Contents?: true

Size: 628 Bytes

Versions: 30

Compression:

Stored size: 628 Bytes

Contents

module Merb::Generators
  
  class HelperGenerator < NamespacedGenerator

    def self.source_root
      File.join(super, 'component', 'helper')
    end
    
    desc <<-DESC
      Generates a new helper.
    DESC
    
    option :testing_framework, :desc => 'Testing framework to use (one of: rspec, test_unit)'
    
    first_argument :name, :required => true, :desc => "helper name"
    
    template :helper do |template|
      template.source = 'app/helpers/%file_name%_helper.rb'
      template.destination = "app/helpers" / base_path / "#{file_name}_helper.rb"
    end
    
  end
  
  add :helper, HelperGenerator
  
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
merb-gen-1.1.3 lib/generators/helper.rb
merb-gen-1.1.2 lib/generators/helper.rb
merb-gen-1.1.1 lib/generators/helper.rb
merb-gen-1.1.0 lib/generators/helper.rb
merb-gen-1.1.0.rc1 lib/generators/helper.rb
merb-gen-1.1.0.pre lib/generators/helper.rb
merb-gen-1.0.15 lib/generators/helper.rb
merb-gen-1.0.14 lib/generators/helper.rb
merb-gen-1.0.13 lib/generators/helper.rb
merb-gen-1.0.12 lib/generators/helper.rb
merb-gen-0.9.11 lib/generators/helper.rb
merb-gen-0.9.10 lib/generators/helper.rb
merb-gen-0.9.12 lib/generators/helper.rb
merb-gen-0.9.13 lib/generators/helper.rb
merb-gen-1.0.2 lib/generators/helper.rb
merb-gen-1.0.11 lib/generators/helper.rb
merb-gen-1.0.10 lib/generators/helper.rb
merb-gen-1.0.1 lib/generators/helper.rb
merb-gen-0.9.9 lib/generators/helper.rb
merb-gen-1.0.6 lib/generators/helper.rb