Class: Porni::Hubs::Client
- Inherits:
-
Object
- Object
- Porni::Hubs::Client
- Defined in:
- lib/porni/hubs/client.rb
Constant Summary collapse
- DEFAULT_TIMEOUT =
{ connect: 2, read: 5, write: 20, }.freeze
Instance Attribute Summary collapse
-
#page ⇒ Object
readonly
Returns the value of attribute page.
-
#timeout ⇒ Object
readonly
Returns the value of attribute timeout.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
12 13 14 15 |
# File 'lib/porni/hubs/client.rb', line 12 def initialize( = {}) @page = [:page].to_s.downcase @timeout = DEFAULT_TIMEOUT.merge([:timeout] || {}) end |
Instance Attribute Details
#page ⇒ Object (readonly)
Returns the value of attribute page.
10 11 12 |
# File 'lib/porni/hubs/client.rb', line 10 def page @page end |
#timeout ⇒ Object (readonly)
Returns the value of attribute timeout.
10 11 12 |
# File 'lib/porni/hubs/client.rb', line 10 def timeout @timeout end |