Class: Ember::ViewGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Ember::ViewGenerator
show all
- Includes:
- GeneratorHelpers
- Defined in:
- lib/generators/ember/view/view_generator.rb
Instance Method Summary
collapse
#application_name, #ember_path, #spec_path
Instance Method Details
#generate_directory ⇒ Object
10
11
12
|
# File 'lib/generators/ember/view/view_generator.rb', line 10
def generate_directory
empty_directory "app/assets/javascripts/ember/views/#{controller_name}"
end
|
#generate_template ⇒ Object
22
23
24
|
# File 'lib/generators/ember/view/view_generator.rb', line 22
def generate_template
template 'template.js.hjs.haml', "app/assets/javascripts/ember/templates/#{controller_name}/#{template_name}.js.hjs.haml"
end
|
#generate_view ⇒ Object
18
19
20
|
# File 'lib/generators/ember/view/view_generator.rb', line 18
def generate_view
template 'view.js.coffee', "app/assets/javascripts/ember/views/#{controller_name}/#{view_name.underscore}.js.coffee"
end
|
#generate_view_namespace ⇒ Object
14
15
16
|
# File 'lib/generators/ember/view/view_generator.rb', line 14
def generate_view_namespace
template 'view_namespace.js.coffee', "app/assets/javascripts/ember/views/#{controller_name}_namespace.js.coffee"
end
|