Class: Metaslug::Generators::InstallGenerator

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details



4
5
6
7
8
9
10
# File 'lib/rails/generators/metaslug/install/install_generator.rb', line 4

def self.banner
  <<-BANNER.chomp
rails generate metaslug:install

Create locale's folder and initializer.
BANNER
end

Instance Method Details

#create_locales_folderObject



12
13
14
# File 'lib/rails/generators/metaslug/install/install_generator.rb', line 12

def create_locales_folder
  empty_directory "config/metaslug"
end

#generate_install_fileObject



16
17
18
# File 'lib/rails/generators/metaslug/install/install_generator.rb', line 16

def generate_install_file
  create_file "config/initializers/metaslug.rb", "require 'liquid'"
end