Class: KennyDialogginsGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/kenny_dialoggins/kenny_dialoggins_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject

This call establishes the path to the templates directory.



8
9
10
# File 'lib/generators/kenny_dialoggins/kenny_dialoggins_generator.rb', line 8

def self.source_root 
  File.join(File.dirname(__FILE__), "templates")
end

Instance Method Details

#generate_assetsObject

This method copies stylesheet and javascript files to the corresponding public directories.



16
17
18
19
# File 'lib/generators/kenny_dialoggins/kenny_dialoggins_generator.rb', line 16

def generate_assets
  copy_file "kenny_dialoggins.css", "public/stylesheets/kenny_dialoggins.css"
  copy_file "kenny_dialoggins.js",  "public/javascripts/kenny_dialoggins.js"
end