class Theblog::ViewsGenerator

Public Instance Methods

copy_views() click to toggle source
# File lib/generators/theblog/views/views_generator.rb, line 4
def copy_views
  views_pattern = File.join self.class.source_root, "**/theblog/**/*.haml"

  Dir.glob(views_pattern).each do |entry|
    unless entry =~ /admin/
      copy_file entry, "app/views/#{entry.match(/(?<=views\/).+/)}"
    end
  end
end