Class: Inboxes::Generators::ViewsGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Inboxes::Generators::ViewsGenerator
- Defined in:
- lib/generators/inboxes/views_generator.rb
Instance Method Summary collapse
-
#copy_or_fetch ⇒ Object
TODO support of both haml and erb.
Instance Method Details
#copy_or_fetch ⇒ Object
TODO support of both haml and erb
10 11 12 13 14 15 |
# File 'lib/generators/inboxes/views_generator.rb', line 10 def copy_or_fetch filename_pattern = File.join self.class.source_root, "*" #/*.html.#{template_engine}" Dir.glob(filename_pattern).map {|f| File.basename f}.each do |f| directory f.to_s, "app/views/#{f}" end end |