Class: Packagecloud::Connection
- Inherits:
-
Object
- Object
- Packagecloud::Connection
- Defined in:
- lib/packagecloud/connection.rb
Instance Attribute Summary collapse
-
#connect_timeout ⇒ Object
readonly
Returns the value of attribute connect_timeout.
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#port ⇒ Object
readonly
Returns the value of attribute port.
-
#read_timeout ⇒ Object
readonly
Returns the value of attribute read_timeout.
-
#scheme ⇒ Object
readonly
Returns the value of attribute scheme.
-
#write_timeout ⇒ Object
readonly
Returns the value of attribute write_timeout.
Instance Method Summary collapse
-
#initialize(scheme = "https", host = "packagecloud.io", port = "443", options = {}) ⇒ Connection
constructor
A new instance of Connection.
Constructor Details
#initialize(scheme = "https", host = "packagecloud.io", port = "443", options = {}) ⇒ Connection
Returns a new instance of Connection.
5 6 7 8 9 10 11 12 13 |
# File 'lib/packagecloud/connection.rb', line 5 def initialize(scheme="https", host="packagecloud.io", port="443", ={}) @scheme = scheme @host = host @port = port @connect_timeout = [:connect_timeout] || 60 @read_timeout = [:read_timeout] || 60 @write_timeout = [:write_timeout] || 180 end |
Instance Attribute Details
#connect_timeout ⇒ Object (readonly)
Returns the value of attribute connect_timeout.
3 4 5 |
# File 'lib/packagecloud/connection.rb', line 3 def connect_timeout @connect_timeout end |
#host ⇒ Object (readonly)
Returns the value of attribute host.
3 4 5 |
# File 'lib/packagecloud/connection.rb', line 3 def host @host end |
#port ⇒ Object (readonly)
Returns the value of attribute port.
3 4 5 |
# File 'lib/packagecloud/connection.rb', line 3 def port @port end |
#read_timeout ⇒ Object (readonly)
Returns the value of attribute read_timeout.
3 4 5 |
# File 'lib/packagecloud/connection.rb', line 3 def read_timeout @read_timeout end |
#scheme ⇒ Object (readonly)
Returns the value of attribute scheme.
3 4 5 |
# File 'lib/packagecloud/connection.rb', line 3 def scheme @scheme end |
#write_timeout ⇒ Object (readonly)
Returns the value of attribute write_timeout.
3 4 5 |
# File 'lib/packagecloud/connection.rb', line 3 def write_timeout @write_timeout end |