Class: Rubber::Commands::VulcanizeThor
- Inherits:
-
Thor
- Object
- Thor
- Rubber::Commands::VulcanizeThor
- Includes:
- Thor::Actions
- Defined in:
- lib/rubber/commands/vulcanize.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
76 77 78 |
# File 'lib/rubber/commands/vulcanize.rb', line 76 def self.source_root File.(File.join(File.dirname(__FILE__), '..', '..', '..', 'templates')) end |
.valid_templates ⇒ Object
80 81 82 |
# File 'lib/rubber/commands/vulcanize.rb', line 80 def self.valid_templates Dir.entries(self.source_root).delete_if {|e| e =~ /(^\.)|svn|CVS/ }.sort end |
Instance Method Details
#vulcanize(template_names) ⇒ Object
86 87 88 89 90 91 |
# File 'lib/rubber/commands/vulcanize.rb', line 86 def vulcanize(template_names) @template_dependencies = template_names.collect {|t| [t] + find_dependencies(t) }.flatten.uniq @template_dependencies.each do |template| apply_template(template) end end |