Class: Hurley::RequestOptions
- Inherits:
-
Struct
- Object
- Struct
- Hurley::RequestOptions
- Defined in:
- lib/hurley/options.rb
Instance Attribute Summary collapse
-
#bind ⇒ Object
Returns the value of attribute bind.
-
#boundary ⇒ Object
Returns the value of attribute boundary.
-
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
-
#proxy ⇒ Object
Returns the value of attribute proxy.
-
#query_class ⇒ Object
Returns the value of attribute query_class.
-
#redirection_limit ⇒ Object
Returns the value of attribute redirection_limit.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
Instance Method Summary collapse
Instance Attribute Details
#bind ⇒ Object
Returns the value of attribute bind
5 6 7 |
# File 'lib/hurley/options.rb', line 5 def bind @bind end |
#boundary ⇒ Object
Returns the value of attribute boundary
5 6 7 |
# File 'lib/hurley/options.rb', line 5 def boundary @boundary end |
#open_timeout ⇒ Object
Returns the value of attribute open_timeout
5 6 7 |
# File 'lib/hurley/options.rb', line 5 def open_timeout @open_timeout end |
#proxy ⇒ Object
Returns the value of attribute proxy
5 6 7 |
# File 'lib/hurley/options.rb', line 5 def proxy @proxy end |
#query_class ⇒ Object
Returns the value of attribute query_class
5 6 7 |
# File 'lib/hurley/options.rb', line 5 def query_class @query_class end |
#redirection_limit ⇒ Object
Returns the value of attribute redirection_limit
5 6 7 |
# File 'lib/hurley/options.rb', line 5 def redirection_limit @redirection_limit end |
#timeout ⇒ Object
Returns the value of attribute timeout
5 6 7 |
# File 'lib/hurley/options.rb', line 5 def timeout @timeout end |
Instance Method Details
#build_form(body) ⇒ Object
47 48 49 |
# File 'lib/hurley/options.rb', line 47 def build_form(body) query_class.new(body).to_form(self) end |
#open_timeout_ms ⇒ Object
35 36 37 |
# File 'lib/hurley/options.rb', line 35 def open_timeout_ms self[:open_timeout].to_i * 1000 end |
#timeout_ms ⇒ Object
31 32 33 |
# File 'lib/hurley/options.rb', line 31 def timeout_ms self[:timeout].to_i * 1000 end |