Class: InstallTheme::InstallThemeGenerator
- Inherits:
-
RubiGen::Base
- Object
- RubiGen::Base
- InstallTheme::InstallThemeGenerator
- Defined in:
- lib/install_theme/install_theme_generator.rb
Instance Method Summary collapse
-
#manifest ⇒ Object
NOTE: runtime_options needs to be passed in to #new.
Instance Method Details
#manifest ⇒ Object
NOTE: runtime_options needs to be passed in to #new
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/install_theme/install_theme_generator.rb', line 4 def manifest record do |m| files = Dir[File.join(source_root, "**/*")].map do |f| f.gsub(source_root, "").gsub(%r{^/}, '') end directories = files.map { |f| File.dirname(f) }.uniq.sort directories.each do |dir| m.directory dir end files.sort.each do |f| next if File.directory?(File.join(source_root, f)) m.file f, f end end end |