Class: Rack::Timeout::RequestDetails

Inherits:
Struct
  • Object
show all
Defined in:
lib/rack/timeout/core.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



27
28
29
# File 'lib/rack/timeout/core.rb', line 27

def id
  @id
end

#serviceObject

Returns the value of attribute service

Returns:

  • (Object)

    the current value of service



27
28
29
# File 'lib/rack/timeout/core.rb', line 27

def service
  @service
end

#stateObject

Returns the value of attribute state

Returns:

  • (Object)

    the current value of state



27
28
29
# File 'lib/rack/timeout/core.rb', line 27

def state
  @state
end

#termObject

Returns the value of attribute term

Returns:

  • (Object)

    the current value of term



27
28
29
# File 'lib/rack/timeout/core.rb', line 27

def term
  @term
end

#timeoutObject

Returns the value of attribute timeout

Returns:

  • (Object)

    the current value of timeout



27
28
29
# File 'lib/rack/timeout/core.rb', line 27

def timeout
  @timeout
end

#waitObject

Returns the value of attribute wait

Returns:

  • (Object)

    the current value of wait



27
28
29
# File 'lib/rack/timeout/core.rb', line 27

def wait
  @wait
end

Instance Method Details

#ms(k) ⇒ Object

helper method used for formatting values in milliseconds



35
36
37
# File 'lib/rack/timeout/core.rb', line 35

def ms(k)   # helper method used for formatting values in milliseconds
  "%.fms" % (self[k] * 1000) if self[k]
end