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



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

def id
  @id
end

#serviceObject

Returns the value of attribute service



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

def service
  @service
end

#stateObject

Returns the value of attribute state



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

def state
  @state
end

#timeoutObject

Returns the value of attribute timeout



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

def timeout
  @timeout
end

#waitObject

Returns the value of attribute wait



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

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