Sha256: d7022421c70b5ca35f38cf07380f73d23f5c984f174b003b680075d0722680ca

Contents?: true

Size: 366 Bytes

Versions: 6

Compression:

Stored size: 366 Bytes

Contents

require "pgbouncerhero/database"

module PgBouncerHero
  class Group

    attr_reader :id, :config, :databases

    def initialize(id, config)
      @id = id
      @config = config || {}
      @databases = config[id].map do |k, v|
        PgBouncerHero::Database.new(self, k, config[id][k])
      end
    end

    def name
      @name ||= id.to_s
    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
pgbouncerhero-2.0.0 lib/pgbouncerhero/group.rb
pgbouncerhero-1.0.3 lib/pgbouncerhero/group.rb
pgbouncerhero-1.0.1 lib/pgbouncerhero/group.rb
pgbouncerhero-1.0.0 lib/pgbouncerhero/group.rb
pgbouncerhero-0.1.1 lib/pgbouncerhero/group.rb
pgbouncerhero-0.1.0 lib/pgbouncerhero/group.rb