Class: Roomer::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Roomer::Generators::InstallGenerator
- Defined in:
- lib/generators/install/install_generator.rb
Instance Method Summary (collapse)
-
- (Object) copy_initializer
Generates the Initializer under config/initializers/roomer.rb.
-
- (Symbol) shared_schema_name
Reads the shared-schema-name and assigns it to Roomer.shared_schema_name.
-
- (Object) show_readme
Displays the instructions for setting up Roomer.
-
- (Symbol) tenants_table
Reads the tenants-table option and assigns it to Roomer.tenants_table config parameter.
Instance Method Details
- (Object) copy_initializer
Generates the Initializer under config/initializers/roomer.rb
28 29 30 |
# File 'lib/generators/install/install_generator.rb', line 28 def copy_initializer template "roomer.rb", "config/initializers/roomer.rb" end |
Reads the shared-schema-name and assigns it to Roomer.shared_schema_name
23 24 25 |
# File 'lib/generators/install/install_generator.rb', line 23 def Roomer. ||= [:shared_schema_name].tableize end |
- (Object) show_readme
Displays the instructions for setting up Roomer
33 34 35 |
# File 'lib/generators/install/install_generator.rb', line 33 def show_readme readme "README" if behavior == :invoke end |
- (Symbol) tenants_table
Reads the tenants-table option and assigns it to Roomer.tenants_table config parameter
17 18 19 |
# File 'lib/generators/install/install_generator.rb', line 17 def tenants_table Roomer.tenants_table ||= [:tenants_table].tableize end |