Class: Integral::Generators::AssetsGenerator

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

Overview

Generates a copy of Integral assets

Examples:

Generate all Integral assets

rails g integral:assets --assets 'backend frontend email'

Instance Method Summary collapse

Instance Method Details

#copy_backend_assetsObject

Copies over backend assets



14
15
16
17
18
19
# File 'lib/generators/integral/assets_generator.rb', line 14

def copy_backend_assets
  return unless options['asset_list'].include?('backend')

  file 'stylesheets/integral/backend.scss'
  directory 'stylesheets/integral/backend'
end

#copy_frontend_assetsObject

Copies over frontend assets



22
23
24
25
26
27
# File 'lib/generators/integral/assets_generator.rb', line 22

def copy_frontend_assets
  return unless options['asset_list'].include?('frontend')

  file 'stylesheets/integral/frontend.scss'
  directory 'stylesheets/integral/frontend'
end

#copy_mailer_assetsObject

Copies over mailer assets



30
31
32
33
34
35
# File 'lib/generators/integral/assets_generator.rb', line 30

def copy_mailer_assets
  return unless options['asset_list'].include?('email')

  file 'stylesheets/integral/emails.scss'
  directory 'stylesheets/integral/emails'
end