Class: PgRls::InstallGenerator

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

Overview

Generator to install the gem

Instance Attribute Summary collapse

Instance Method Summary collapse

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, *options)
  pg_rls_config(args.first)
  super
end

Instance Attribute Details

#attributesObject (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_configObject



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_readmeObject



21
22
23
# File 'lib/generators/pg_rls/install/install_generator.rb', line 21

def show_readme
  readme "USAGE" if invoke?
end