Class: Ohmage::Audit
- Inherits:
-
Object
- Object
- Ohmage::Audit
- Defined in:
- lib/ohmage/entity/audit.rb
Instance Attribute Summary collapse
- #client ⇒ String readonly
- #extra_data ⇒ Hash readonly
- #received_millis ⇒ Fixnum readonly
- #request_parameters ⇒ Hash readonly
- #request_type ⇒ String readonly
- #responded_millis ⇒ Fixnum readonly
- #response ⇒ Hash readonly
- #timestamp ⇒ String readonly
- #uri ⇒ String readonly
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Audit
constructor
A new instance of Audit.
Constructor Details
#initialize(attrs = {}) ⇒ Audit
Returns a new instance of Audit.
10 11 12 13 14 15 |
# File 'lib/ohmage/entity/audit.rb', line 10 def initialize(attrs = {}) attrs.keys[0].each do |k, v| instance_variable_set("@#{k}", v) end @duration_millis = @responded_millis - @received_millis end |
Instance Attribute Details
#client ⇒ String (readonly)
4 5 6 |
# File 'lib/ohmage/entity/audit.rb', line 4 def client @client end |
#extra_data ⇒ Hash (readonly)
6 7 8 |
# File 'lib/ohmage/entity/audit.rb', line 6 def extra_data @extra_data end |
#received_millis ⇒ Fixnum (readonly)
8 9 10 |
# File 'lib/ohmage/entity/audit.rb', line 8 def received_millis @received_millis end |
#request_parameters ⇒ Hash (readonly)
6 7 8 |
# File 'lib/ohmage/entity/audit.rb', line 6 def request_parameters @request_parameters end |
#request_type ⇒ String (readonly)
4 5 6 |
# File 'lib/ohmage/entity/audit.rb', line 4 def request_type @request_type end |
#responded_millis ⇒ Fixnum (readonly)
8 9 10 |
# File 'lib/ohmage/entity/audit.rb', line 8 def responded_millis @responded_millis end |
#response ⇒ Hash (readonly)
6 7 8 |
# File 'lib/ohmage/entity/audit.rb', line 6 def response @response end |
#timestamp ⇒ String (readonly)
4 5 6 |
# File 'lib/ohmage/entity/audit.rb', line 4 def @timestamp end |
#uri ⇒ String (readonly)
4 5 6 |
# File 'lib/ohmage/entity/audit.rb', line 4 def uri @uri end |