Class: CaseForm::Generators::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#copy_configObject



11
12
13
# File 'lib/generators/case_form/install_generator.rb', line 11

def copy_config
  copy_file "case_form.rb", "config/initializers/case_form.rb"
end

#copy_javascriptsObject



22
23
24
# File 'lib/generators/case_form/install_generator.rb', line 22

def copy_javascripts
  copy_file "javascripts/#{options.javascripts}.case_form.js", "public/javascripts/case_form.js"
end

#copy_localesObject



26
27
28
29
30
# File 'lib/generators/case_form/install_generator.rb', line 26

def copy_locales
  options.locales.each do |l|
    copy_file "locales/#{l}.yml", "config/locales/case_form/#{l}.yml"
  end
end

#copy_stylesheetsObject



15
16
17
18
19
20
# File 'lib/generators/case_form/install_generator.rb', line 15

def copy_stylesheets
  if options.stylesheets?
    copy_file "stylesheets/stylesheet.css", "public/stylesheets/case_form.css"
    copy_file "stylesheets/stylesheet_changes.css", "public/stylesheets/case_form_changes.css"
  end
end