Class: Buoys::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#create_filesObject



9
10
11
12
13
14
15
16
17
18
# File 'lib/generators/buoys/install_generator.rb', line 9

def create_files
  copy_file 'buoys.en.yml', 'config/locales/buoys.en.yml'
  copy_file 'breadcrumbs.rb', 'config/buoys/breadcrumbs.rb'

  if %w(haml slim).include?(template_type = options[:template])
    copy_file "_buoys.html.#{template_type}", "app/views/breadcrumbs/_buoys.html.#{template_type}"
  else
    copy_file '_buoys.html.erb', 'app/views/breadcrumbs/_buoys.html.erb'
  end
end