Class: NgComponentGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
Utilities
Defined in:
lib/generators/ng_component/ng_component_generator.rb

Instance Method Summary collapse

Methods included from Utilities

#formatted_name, #uncapitalize_first_char

Instance Method Details

#create_controllerObject



17
18
19
# File 'lib/generators/ng_component/ng_component_generator.rb', line 17

def create_controller
  template "controller.js.erb", root_directory_with('controller.js')
end

#create_directiveObject



9
10
11
# File 'lib/generators/ng_component/ng_component_generator.rb', line 9

def create_directive
  template "directive.js.erb", root_directory_with('directive.js')
end

#create_moduleObject



21
22
23
# File 'lib/generators/ng_component/ng_component_generator.rb', line 21

def create_module
  template "module.js.erb", root_directory_with("module.js")
end

#create_templateObject



13
14
15
# File 'lib/generators/ng_component/ng_component_generator.rb', line 13

def create_template
  template "template.html.erb", root_directory_with('template.html')
end