Class: Aptly::Configuration
- Inherits:
-
Object
- Object
- Aptly::Configuration
- Extended by:
- Gem::Deprecate
- Defined in:
- lib/aptly/configuration.rb
Overview
Configuration.
Instance Attribute Summary collapse
-
#host ⇒ String
deprecated
Deprecated.
use #uri
-
#path ⇒ String
deprecated
Deprecated.
use #uri
-
#port ⇒ Integer
deprecated
Deprecated.
use #uri
-
#uri ⇒ URI
Generally any suitable URI is allowed.
Instance Method Summary collapse
-
#initialize(uri: URI::HTTP.build(host: 'localhost', port: 80, path: '/'), host: nil, port: nil, path: nil) ⇒ Configuration
constructor
Creates a new instance.
Constructor Details
#initialize(uri: URI::HTTP.build(host: 'localhost', port: 80, path: '/'), host: nil, port: nil, path: nil) ⇒ Configuration
Creates a new instance.
19 20 21 22 23 24 25 26 27 |
# File 'lib/aptly/configuration.rb', line 19 def initialize(uri: URI::HTTP.build(host: 'localhost', port: 80, path: '/'), host: nil, port: nil, path: nil) @uri = nil @uri = uri unless host || port || path return if @uri @uri = fallback_uri(host, port, path) end |
Instance Attribute Details
#host ⇒ String
Deprecated.
use #uri
Returns host name to talk to.
|
|
# File 'lib/aptly/configuration.rb', line 29
|
#path ⇒ String
Deprecated.
use #uri
Returns path to use (defaults to /).
|
|
# File 'lib/aptly/configuration.rb', line 37
|
#port ⇒ Integer
Deprecated.
use #uri
Returns port to talk to host to on.
|
|
# File 'lib/aptly/configuration.rb', line 33
|
#uri ⇒ URI
Generally any suitable URI is allowed. This can also be a Unix domain socket which needs to be used in the notation unix:/tmp/sock.
12 13 14 |
# File 'lib/aptly/configuration.rb', line 12 def uri @uri end |