Class: Eyeballs::ControllerGenerator
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Eyeballs::ControllerGenerator
show all
- Includes:
- AppDetector, Thor::Actions
- Defined in:
- lib/eyeballs/controller_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
10
11
12
|
# File 'lib/eyeballs/controller_generator.rb', line 10
def self.source_root
File.join(File.dirname(__FILE__), '..', '..')
end
|
Instance Method Details
#build_the_model ⇒ Object
18
19
20
21
|
# File 'lib/eyeballs/controller_generator.rb', line 18
def build_the_model
template "templates/controller.js", "#{app_path}/app/controllers/#{name.downcase}_controller.js"
empty_directory "#{app_path}/app/views/#{name.downcase}"
end
|
#farewell ⇒ Object
23
24
25
|
# File 'lib/eyeballs/controller_generator.rb', line 23
def farewell
$stdout.puts "Your controller is ready to rule!"
end
|
#greeting ⇒ Object
14
15
16
|
# File 'lib/eyeballs/controller_generator.rb', line 14
def greeting
$stdout.puts "Creating new eyeballs.js controller #{name.pluralize}Controller"
end
|