Class: FancyboxRailsGenerator

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

Instance Method Summary collapse

Instance Method Details

#copy_assetsObject



5
6
7
8
9
10
11
12
# File 'lib/generators/fancybox_rails_generator.rb', line 5

def copy_assets
  dir = Pathname.new(self.class.source_root)
  Dir[self.class.source_root + '/**/*'].each do |entry|
    next if File.directory?(entry)
    file = Pathname.new(entry).relative_path_from(dir)
    copy_file file, "lib/assets/#{file}"
  end
end