Class: Seira::Db::WritePgbouncerYaml

Inherits:
Object
  • Object
show all
Includes:
Commands
Defined in:
lib/seira/db/write_pgbouncer_yaml.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#appObject (readonly)

Returns the value of attribute app.



6
7
8
# File 'lib/seira/db/write_pgbouncer_yaml.rb', line 6

def app
  @app
end

#contextObject (readonly)

Returns the value of attribute context.



6
7
8
# File 'lib/seira/db/write_pgbouncer_yaml.rb', line 6

def context
  @context
end

#nameObject (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

#runObject



19
20
21
# File 'lib/seira/db/write_pgbouncer_yaml.rb', line 19

def run
  write_pgbouncer_yaml
end