Class: Eyeballs::ModelGenerator
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Eyeballs::ModelGenerator
show all
- Includes:
- AppDetector, Thor::Actions
- Defined in:
- lib/eyeballs/model_generator.rb
Class Method Summary
collapse
Instance Method Summary
collapse
#app_path, #new_app_path, #prefix, #public_path, #rack_app?
Class Method Details
.source_root ⇒ Object
9
10
11
|
# File 'lib/eyeballs/model_generator.rb', line 9
def self.source_root
File.join(File.dirname(__FILE__), '..', '..')
end
|
Instance Method Details
#build_the_model ⇒ Object
17
18
19
|
# File 'lib/eyeballs/model_generator.rb', line 17
def build_the_model
template "templates/model.js", "#{app_path}/app/models/#{name.downcase}.js"
end
|
#farewell ⇒ Object
21
22
23
|
# File 'lib/eyeballs/model_generator.rb', line 21
def farewell
$stdout.puts "Your model is ready to rock!"
end
|
#greeting ⇒ Object
13
14
15
|
# File 'lib/eyeballs/model_generator.rb', line 13
def greeting
$stdout.puts "Creating new eyeballs.js model #{name}"
end
|