Class: Rack::Timeout::RequestDetails

Inherits:
Struct
  • Object
show all
Defined in:
lib/rack/timeout.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



10
11
12
# File 'lib/rack/timeout.rb', line 10

def id
  @id
end

#serviceObject

Returns the value of attribute service

Returns:

  • (Object)

    the current value of service



10
11
12
# File 'lib/rack/timeout.rb', line 10

def service
  @service
end

#stateObject

Returns the value of attribute state

Returns:

  • (Object)

    the current value of state



10
11
12
# File 'lib/rack/timeout.rb', line 10

def state
  @state
end

#timeoutObject

Returns the value of attribute timeout

Returns:

  • (Object)

    the current value of timeout



10
11
12
# File 'lib/rack/timeout.rb', line 10

def timeout
  @timeout
end

#waitObject

Returns the value of attribute wait

Returns:

  • (Object)

    the current value of wait



10
11
12
# File 'lib/rack/timeout.rb', line 10

def wait
  @wait
end

Instance Method Details

#ms(k) ⇒ Object

helper method used for formatting values in milliseconds



17
18
19
# File 'lib/rack/timeout.rb', line 17

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