Class: Hurley::RequestOptions

Inherits:
Struct
  • Object
show all
Defined in:
lib/hurley/options.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bindObject

Returns the value of attribute bind

Returns:

  • (Object)

    the current value of bind



5
6
7
# File 'lib/hurley/options.rb', line 5

def bind
  @bind
end

#boundaryObject

Returns the value of attribute boundary

Returns:

  • (Object)

    the current value of boundary



5
6
7
# File 'lib/hurley/options.rb', line 5

def boundary
  @boundary
end

#open_timeoutObject

Returns the value of attribute open_timeout

Returns:

  • (Object)

    the current value of open_timeout



5
6
7
# File 'lib/hurley/options.rb', line 5

def open_timeout
  @open_timeout
end

#proxyObject

Returns the value of attribute proxy

Returns:

  • (Object)

    the current value of proxy



5
6
7
# File 'lib/hurley/options.rb', line 5

def proxy
  @proxy
end

#query_classObject

Returns the value of attribute query_class

Returns:

  • (Object)

    the current value of query_class



5
6
7
# File 'lib/hurley/options.rb', line 5

def query_class
  @query_class
end

#redirection_limitObject

Returns the value of attribute redirection_limit

Returns:

  • (Object)

    the current value of redirection_limit



5
6
7
# File 'lib/hurley/options.rb', line 5

def redirection_limit
  @redirection_limit
end

#timeoutObject

Returns the value of attribute timeout

Returns:

  • (Object)

    the current value of 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_msObject



35
36
37
# File 'lib/hurley/options.rb', line 35

def open_timeout_ms
  self[:open_timeout].to_i * 1000
end

#timeout_msObject



31
32
33
# File 'lib/hurley/options.rb', line 31

def timeout_ms
  self[:timeout].to_i * 1000
end