Class: Ember::ViewGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
GeneratorHelpers
Defined in:
lib/generators/ember/view/view_generator.rb

Instance Method Summary collapse

Methods included from GeneratorHelpers

#application_name, #ember_path, #spec_path

Instance Method Details

#generate_directoryObject



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_templateObject



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_viewObject



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_namespaceObject



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