Class: Observation
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- Observation
- Defined in:
- lib/helpers/observation.rb
Overview
Generic OpenStruct, with occured_at automatically set to the initialization time.
Instance Attribute Summary collapse
-
#occured_at ⇒ Object
Need to know when the observation was recorded to batch observations.
Instance Method Summary collapse
-
#initialize(*args) ⇒ Observation
constructor
A new instance of Observation.
Methods inherited from OpenStruct
#include?, #keys, #table, #values
Constructor Details
#initialize(*args) ⇒ Observation
Returns a new instance of Observation.
3 4 5 6 |
# File 'lib/helpers/observation.rb', line 3 def initialize(*args) @occured_at = Time.now super end |
Instance Attribute Details
#occured_at ⇒ Object
Need to know when the observation was recorded to batch observations
9 10 11 |
# File 'lib/helpers/observation.rb', line 9 def occured_at @occured_at end |