Sha256: 2b7227d923cc55f9e1486292bb58145e890c27916b52adccd5e9f96ad339338c

Contents?: true

Size: 512 Bytes

Versions: 10

Compression:

Stored size: 512 Bytes

Contents

# frozen_string_literal: true

module TableSaw
  class Configuration
    attr_accessor :dbname, :host, :port, :user, :password, :manifest, :output, :format

    def connection
      { dbname: dbname, host: host, port: port, user: user, password: password }
    end

    def url=(value)
      URI.parse(value).tap do |uri|
        self.dbname = uri.path[1..-1]
        self.host = uri.host
        self.port = uri.port
        self.user = uri.user
        self.password = uri.password
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
table_saw-2.8.1 lib/table_saw/configuration.rb
table_saw-2.8.0 lib/table_saw/configuration.rb
table_saw-2.7.0 lib/table_saw/configuration.rb
table_saw-2.6.0 lib/table_saw/configuration.rb
table_saw-2.5.0 lib/table_saw/configuration.rb
table_saw-2.4.3 lib/table_saw/configuration.rb
table_saw-2.4.2 lib/table_saw/configuration.rb
table_saw-2.4.1 lib/table_saw/configuration.rb
table_saw-2.4.0 lib/table_saw/configuration.rb
table_saw-2.3.0 lib/table_saw/configuration.rb