Class: Lifeapi::Query
- Inherits:
-
Object
- Object
- Lifeapi::Query
- 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
-
#activity ⇒ Object
Returns the value of attribute activity.
-
#query_time ⇒ Object
Returns the value of attribute query_time.
-
#record_date ⇒ Object
Returns the value of attribute record_date.
Instance Method Summary collapse
-
#initialize(query_time, record_date, activity) ⇒ Query
constructor
A new instance of Query.
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
#activity ⇒ Object
Returns the value of attribute activity.
71 72 73 |
# File 'lib/lifeapi.rb', line 71 def activity @activity end |
#query_time ⇒ Object
Returns the value of attribute query_time.
71 72 73 |
# File 'lib/lifeapi.rb', line 71 def query_time @query_time end |
#record_date ⇒ Object
Returns the value of attribute record_date.
71 72 73 |
# File 'lib/lifeapi.rb', line 71 def record_date @record_date end |