class TheStoragesGenerator

Public Instance Methods

generate_controllers() click to toggle source

argument :xname, type: :string, default: :xname

# File lib/generators/the_storages/the_storages_generator.rb, line 5
def generate_controllers
  if gen_name == 'install'
    cp_init_file
  else
    puts 'TheStorages Generator - wrong Name'
    puts 'Try to use [install]'
  end
end

Private Instance Methods

cp_init_file() click to toggle source
# File lib/generators/the_storages/the_storages_generator.rb, line 20
def cp_init_file
  copy_file 'the_storages.rb', 'config/initializers/the_storages.rb'
end
gen_name() click to toggle source
# File lib/generators/the_storages/the_storages_generator.rb, line 16
def gen_name
  name.to_s.downcase
end