Class: Lobby::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Lobby::InstallGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/lobby/install_generator.rb
Instance Attribute Summary collapse
-
#session_name ⇒ Object
Returns the value of attribute session_name.
-
#user_name ⇒ Object
Returns the value of attribute user_name.
Instance Method Summary collapse
- #create_config_files ⇒ Object
- #create_locales ⇒ Object
- #create_migration ⇒ Object
- #create_views ⇒ Object
- #setup_routes ⇒ Object
Instance Attribute Details
#session_name ⇒ Object
Returns the value of attribute session_name.
8 9 10 |
# File 'lib/generators/lobby/install_generator.rb', line 8 def session_name @session_name end |
#user_name ⇒ Object
Returns the value of attribute user_name.
8 9 10 |
# File 'lib/generators/lobby/install_generator.rb', line 8 def user_name @user_name end |
Instance Method Details
#create_config_files ⇒ Object
24 25 26 27 |
# File 'lib/generators/lobby/install_generator.rb', line 24 def create_config_files template "config/config.yml", "config/app_config.yml" template "config/locales/en.yml", "config/locales/en.lobby.yml" end |
#create_locales ⇒ Object
19 20 21 22 |
# File 'lib/generators/lobby/install_generator.rb', line 19 def create_locales template "config/locales/de.yml", "config/locales/de.lobby.yml" template "config/locales/en.yml", "config/locales/en.lobby.yml" end |
#create_migration ⇒ Object
39 40 41 |
# File 'lib/generators/lobby/install_generator.rb', line 39 def create_migration migration_template 'db/migrate/create_users.rb', "db/migrate/create_#{user_plural_name}.rb" end |
#create_views ⇒ Object
15 16 17 |
# File 'lib/generators/lobby/install_generator.rb', line 15 def create_views directory "views", "app/views/lobby" end |
#setup_routes ⇒ Object
35 36 37 |
# File 'lib/generators/lobby/install_generator.rb', line 35 def setup_routes route "mount Lobby::Engine => '/', :as => 'lobby_engine'" end |