Sha256: 70fa666713e6d3178332243784fcec566651ef2aad98c7f527bea240c3ebbfc4

Contents?: true

Size: 503 Bytes

Versions: 13

Compression:

Stored size: 503 Bytes

Contents

# frozen_string_literal: true

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

    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

13 entries across 13 versions & 1 rubygems

Version Path
table_saw-2.2.0 lib/table_saw/configuration.rb
table_saw-2.1.0 lib/table_saw/configuration.rb
table_saw-2.0.0 lib/table_saw/configuration.rb
table_saw-1.3.0 lib/table_saw/configuration.rb
table_saw-1.1.0 lib/table_saw/configuration.rb
table_saw-1.0.1 lib/table_saw/configuration.rb
table_saw-1.0.0 lib/table_saw/configuration.rb
table_saw-0.5.0 lib/table_saw/configuration.rb
table_saw-0.4.0 lib/table_saw/configuration.rb
table_saw-0.3.0 lib/table_saw/configuration.rb
table_saw-0.2.1 lib/table_saw/configuration.rb
table_saw-0.2.0 lib/table_saw/configuration.rb
table_saw-0.1.0 lib/table_saw/configuration.rb