Class: Lifeapi::Query

Inherits:
Object
  • Object
show all
Defined in:
lib/lifeapi.rb

Overview

contains an activity and query time query_time: the time that was used in the query activity: the single activitiy that belongs to this query object

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(query_time, record_date, activity) ⇒ Query

Returns a new instance of Query.



73
74
75
76
77
# File 'lib/lifeapi.rb', line 73

def initialize(query_time, record_date, activity)
  self.query_time = query_time
  self.record_date = record_date
  self.activity = Query_activity.new(activity["self_type"], activity["duration"], activity["start_time"], activity["end_time"])
end

Instance Attribute Details

#activityObject

Returns the value of attribute activity.



71
72
73
# File 'lib/lifeapi.rb', line 71

def activity
  @activity
end

#query_timeObject

Returns the value of attribute query_time.



71
72
73
# File 'lib/lifeapi.rb', line 71

def query_time
  @query_time
end

#record_dateObject

Returns the value of attribute record_date.



71
72
73
# File 'lib/lifeapi.rb', line 71

def record_date
  @record_date
end