Class: AdminTools::Generators::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#create_css_fileObject



19
20
21
22
23
24
25
26
27
# File 'lib/generators/admin_tools/install/install_generator.rb', line 19

def create_css_file
  return unless options[:css]

  if options[:tailwind]
    template "admin_tools_tailwind.css", "app/assets/stylesheets/admin_tools.css"
  else
    template "admin_tools.css", "app/assets/stylesheets/admin_tools.css"
  end
end

#create_initializerObject



15
16
17
# File 'lib/generators/admin_tools/install/install_generator.rb', line 15

def create_initializer
  template "initializer.rb", "config/initializers/admin_tools.rb"
end

#show_readmeObject



29
30
31
# File 'lib/generators/admin_tools/install/install_generator.rb', line 29

def show_readme
  readme "README" if behavior == :invoke
end