Class: Ember::Generators::ComponentGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Ember::Generators::ComponentGenerator
- Includes:
- GeneratorHelpers
- Defined in:
- lib/generators/ember/component_generator.rb
Instance Method Summary collapse
Methods included from GeneratorHelpers
#application_name, #class_name, #configuration, #ember_path, #engine_extension, #engine_name, #handlebars_template_path, #javascript_engine, #rails_engine?
Instance Method Details
#create_component_files ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/generators/ember/component_generator.rb', line 18 def create_component_files dashed_file_name = file_name.dasherize comp_path = File.join(ember_path, 'components', class_path, "#{dashed_file_name}.#{engine_extension}") template "component.#{engine_extension}", comp_path templ_path = File.join(ember_path, 'templates/components', class_path, "#{dashed_file_name}.hbs") template 'component.template.hbs', templ_path end |