Class: Lifeapi::Day
- Inherits:
-
Object
- Object
- Lifeapi::Day
- Defined in:
- lib/lifeapi.rb
Overview
contains a single day record_date: date the day was recorded (or logged) activites: array of activites that belong to the day
Instance Attribute Summary collapse
-
#activities ⇒ Object
Returns the value of attribute activities.
-
#record_date ⇒ Object
Returns the value of attribute record_date.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(record_date, activities) ⇒ Day
constructor
A new instance of Day.
Constructor Details
#initialize(record_date, activities) ⇒ Day
Returns a new instance of Day.
15 16 17 18 |
# File 'lib/lifeapi.rb', line 15 def initialize(record_date, activities) self.record_date = record_date self.activities = Day.parse_activities(activities) end |
Instance Attribute Details
#activities ⇒ Object
Returns the value of attribute activities.
13 14 15 |
# File 'lib/lifeapi.rb', line 13 def activities @activities end |
#record_date ⇒ Object
Returns the value of attribute record_date.
13 14 15 |
# File 'lib/lifeapi.rb', line 13 def record_date @record_date end |