Class: PgRls::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- PgRls::InstallGenerator
- Defined in:
- lib/generators/pg_rls/install/install_generator.rb
Overview
Generator to install the gem
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
- #create_install_config ⇒ Object
-
#initialize(args, *options) ⇒ InstallGenerator
constructor
A new instance of InstallGenerator.
- #show_readme ⇒ Object
Constructor Details
#initialize(args, *options) ⇒ InstallGenerator
Returns a new instance of InstallGenerator.
10 11 12 13 |
# File 'lib/generators/pg_rls/install/install_generator.rb', line 10 def initialize(args, *) pg_rls_config(args.first) super end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
8 9 10 |
# File 'lib/generators/pg_rls/install/install_generator.rb', line 8 def attributes @attributes end |
Instance Method Details
#create_install_config ⇒ Object
15 16 17 |
# File 'lib/generators/pg_rls/install/install_generator.rb', line 15 def create_install_config template "config/initializers/pg_rls.rb" end |
#show_readme ⇒ Object
21 22 23 |
# File 'lib/generators/pg_rls/install/install_generator.rb', line 21 def show_readme readme "USAGE" if invoke? end |