Class: Inboxes::Generators::ViewsGenerator

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

Instance Method Summary collapse

Instance Method Details

#copy_or_fetchObject

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