Class: VulcanizeGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- VulcanizeGenerator
- Includes:
- Rails::Generator::Commands
- Defined in:
- lib/generators/vulcanize/vulcanize_generator.rb,
lib/generators/vulcanize/vulcanize_generator.rb
Constant Summary collapse
- TEMPLATE_ROOT =
File.dirname(__FILE__) + "/templates"
- TEMPLATE_FILE =
"templates.yml"
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
104 105 106 |
# File 'lib/generators/vulcanize/vulcanize_generator.rb', line 104 def self.source_root File.join(File.dirname(__FILE__), 'templates') end |
Instance Method Details
#copy_template_files ⇒ Object
108 109 110 111 112 113 |
# File 'lib/generators/vulcanize/vulcanize_generator.rb', line 108 def copy_template_files @template_dependencies = find_dependencies(file_name) ([file_name] + @template_dependencies).each do |template| apply_template(template) end end |
#manifest ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/generators/vulcanize/vulcanize_generator.rb', line 24 def manifest record do |m| templates = [file_name] + actions templates.each do |t| apply_template(m, t) end end end |