Class: Seira::Db::WritePgbouncerYaml
- Inherits:
-
Object
- Object
- Seira::Db::WritePgbouncerYaml
- Includes:
- Commands
- Defined in:
- lib/seira/db/write_pgbouncer_yaml.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
readonly
Returns the value of attribute app.
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(app:, args:, context:) ⇒ WritePgbouncerYaml
constructor
A new instance of WritePgbouncerYaml.
- #run ⇒ Object
Methods included from Commands
#gcloud, gcloud, kubectl, #kubectl, #tsh, tsh
Constructor Details
#initialize(app:, args:, context:) ⇒ WritePgbouncerYaml
Returns a new instance of WritePgbouncerYaml.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/seira/db/write_pgbouncer_yaml.rb', line 8 def initialize(app:, args:, context:) if args.length != 1 puts 'Specify db name as positional argument' exit(1) end @app = app @name = args[0] @context = context end |
Instance Attribute Details
#app ⇒ Object (readonly)
Returns the value of attribute app.
6 7 8 |
# File 'lib/seira/db/write_pgbouncer_yaml.rb', line 6 def app @app end |
#context ⇒ Object (readonly)
Returns the value of attribute context.
6 7 8 |
# File 'lib/seira/db/write_pgbouncer_yaml.rb', line 6 def context @context end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/seira/db/write_pgbouncer_yaml.rb', line 6 def name @name end |
Instance Method Details
#run ⇒ Object
19 20 21 |
# File 'lib/seira/db/write_pgbouncer_yaml.rb', line 19 def run write_pgbouncer_yaml end |