Sha256: e5d725a36018505bf9433c338c1fb29e3ae451c0ef20a1097e9a28a250b06cf7

Contents?: true

Size: 416 Bytes

Versions: 5

Compression:

Stored size: 416 Bytes

Contents

module RailsScript
  module Generators
    class ElementGenerator < ::Rails::Generators::Base
      source_root File.expand_path('../templates', __FILE__)
      argument :element_name, type: :string
      argument :utility, type: :string, default: ''

      def generate_file
        template 'javascript.js.coffee', "app/assets/javascripts/elements/#{element_name.underscore}.js.coffee"
      end

    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rails_script-2.0.4 lib/generators/rails_script/element/element_generator.rb
rails_script-2.0.3 lib/generators/rails_script/element/element_generator.rb
rails_script-2.0.2 lib/generators/rails_script/element/element_generator.rb
rails_script-2.0.1 lib/generators/rails_script/element/element_generator.rb
rails_script-2.0.0 lib/generators/rails_script/element/element_generator.rb