Sha256: cbfe2a5439129c433910e80438313bf2107d927d4981ac49b9add3db492fb6f6

Contents?: true

Size: 553 Bytes

Versions: 34

Compression:

Stored size: 553 Bytes

Contents

module Bowline::Generators
  class HelperGenerator < NamedGenerator
    desc <<-DESC
      Generates a new helper.
    DESC
    
    def modules
      []
    end
    
    def module_name
      "#{self.name.camel_case}Helper"
    end
    
    def file_name
      "#{name}_helper"
    end
    
    first_argument :name, :required => true, :desc => "helper name"
    
    template :helper do |template|
      template.source       = "helper.rb"
      template.destination  = "app/helpers/#{file_name}.rb"
    end
  end
  
  add :helper, HelperGenerator
end

Version data entries

34 entries across 34 versions & 2 rubygems

Version Path
maccman-bowline-0.3.0 lib/bowline/generators/helper.rb
maccman-bowline-0.3.1 lib/bowline/generators/helper.rb
maccman-bowline-0.3.3 lib/bowline/generators/helper.rb
maccman-bowline-0.3.5 lib/bowline/generators/helper.rb
maccman-bowline-0.3.6 lib/bowline/generators/helper.rb
maccman-bowline-0.3.7 lib/bowline/generators/helper.rb
maccman-bowline-0.3.9 lib/bowline/generators/helper.rb
maccman-bowline-0.4.0 lib/bowline/generators/helper.rb
maccman-bowline-0.4.1 lib/bowline/generators/helper.rb
maccman-bowline-0.4.3 lib/bowline/generators/helper.rb
maccman-bowline-0.4.4 lib/bowline/generators/helper.rb
maccman-bowline-0.4.5 lib/bowline/generators/helper.rb
maccman-bowline-0.4.6 lib/bowline/generators/helper.rb
maccman-bowline-0.4.7 lib/bowline/generators/helper.rb
maccman-bowline-0.4.8 lib/bowline/generators/helper.rb
bowline-0.9.4 lib/bowline/generators/helper.rb
bowline-0.9.3 lib/bowline/generators/helper.rb
bowline-0.9.2 lib/bowline/generators/helper.rb
bowline-0.9.1 lib/bowline/generators/helper.rb
bowline-0.6.3 lib/bowline/generators/helper.rb