Class: Ember::ModelGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Ember::ModelGenerator
show all
- Includes:
- GeneratorHelpers
- Defined in:
- lib/generators/ember/model/model_generator.rb
Instance Method Summary
collapse
#application_name, #ember_path, #spec_path
Instance Method Details
#generate_directory ⇒ Object
9
10
11
|
# File 'lib/generators/ember/model/model_generator.rb', line 9
def generate_directory
empty_directory "#{ember_path}/models"
end
|
#generate_model ⇒ Object
13
14
15
|
# File 'lib/generators/ember/model/model_generator.rb', line 13
def generate_model
template 'model.js.coffee.erb', "#{ember_path}/models/#{model_name}.js.coffee.erb"
end
|
#generate_specs ⇒ Object
17
18
19
|
# File 'lib/generators/ember/model/model_generator.rb', line 17
def generate_specs
template 'model_spec.js.coffee', "spec/javascripts/models/#{model_name}_spec.js.coffee"
end
|