Class: MichaelHintbubleGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- MichaelHintbubleGenerator
- Defined in:
- lib/generators/michael_hintbuble/michael_hintbuble_generator.rb
Class Method Summary collapse
-
.source_root ⇒ Object
This call establishes the path to the templates directory.
Instance Method Summary collapse
-
#generate_assets ⇒ Object
This method copies images, javascript, and stylesheet files to the corresponding public directories.
Class Method Details
.source_root ⇒ Object
This call establishes the path to the templates directory.
8 9 10 |
# File 'lib/generators/michael_hintbuble/michael_hintbuble_generator.rb', line 8 def self.source_root File.join(File.dirname(__FILE__), "templates") end |
Instance Method Details
#generate_assets ⇒ Object
This method copies images, javascript, and stylesheet files to the corresponding public directories.
16 17 18 19 20 21 |
# File 'lib/generators/michael_hintbuble/michael_hintbuble_generator.rb', line 16 def generate_assets copy_file "help_bubble_pointer.png", "public/images/help_bubble_pointer.png" copy_file "error_bubble_pointer.png", "public/images/error_bubble_pointer.png" copy_file "michael_hintbuble.css", "public/stylesheets/michael_hintbuble.css" copy_file "michael_hintbuble.js", "public/javascripts/michael_hintbuble.js" end |