Class: Observation

Inherits:
OpenStruct show all
Defined in:
lib/helpers/observation.rb

Overview

Generic OpenStruct, with occured_at automatically set to the initialization time.

Instance Attribute Summary collapse

Instance Method Summary collapse

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_atObject

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