Sha256: 3c34b5441f1ad06db8810dbeec94a124bdcc3ffee3ddb770d9c3d8d990ae2072

Contents?: true

Size: 519 Bytes

Versions: 8

Compression:

Stored size: 519 Bytes

Contents

require 'generators/ember/generator_helpers'

module Ember
  module Generators
    class HelperGenerator < ::Rails::Generators::NamedBase
      include Ember::Generators::GeneratorHelpers

      source_root File.expand_path("../../templates", __FILE__)
      argument :name, :type => :string, :desc => 'Create an Ember.Handlebars.helper'

      def create_helper_files
        file_path = File.join(app_path, 'helpers', class_path, "#{file_name}.js")
        template 'helper.js', file_path
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ember-appkit-rails-0.5.0 lib/generators/ember/helper_generator.rb
ember-appkit-rails-0.4.0 lib/generators/ember/helper_generator.rb
ember-appkit-rails-0.3.2 lib/generators/ember/helper_generator.rb
ember-appkit-rails-0.3.1 lib/generators/ember/helper_generator.rb
ember-appkit-rails-0.3.0 lib/generators/ember/helper_generator.rb
ember-appkit-rails-0.2.2 lib/generators/ember/helper_generator.rb
ember-appkit-rails-0.2.1 lib/generators/ember/helper_generator.rb
ember-appkit-rails-0.2.0 lib/generators/ember/helper_generator.rb