Class: Lifeapi::Range
- Inherits:
-
Object
- Object
- Lifeapi::Range
- Defined in:
- lib/lifeapi.rb
Overview
contains a range of days, condensed start_date: date that the earliest day in range was recorded end_date: date that the latest day in range was recorded activities: array of activities that belongs to the range
Instance Attribute Summary collapse
-
#activities ⇒ Object
Returns the value of attribute activities.
-
#end_date ⇒ Object
Returns the value of attribute end_date.
-
#start_date ⇒ Object
Returns the value of attribute start_date.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(start_date, end_date, activities) ⇒ Range
constructor
A new instance of Range.
Constructor Details
#initialize(start_date, end_date, activities) ⇒ Range
Returns a new instance of Range.
51 52 53 54 55 |
# File 'lib/lifeapi.rb', line 51 def initialize(start_date, end_date, activities) self.start_date = start_date self.end_date = end_date self.activities = Day.parse_activities(activities) end |
Instance Attribute Details
#activities ⇒ Object
Returns the value of attribute activities.
49 50 51 |
# File 'lib/lifeapi.rb', line 49 def activities @activities end |
#end_date ⇒ Object
Returns the value of attribute end_date.
49 50 51 |
# File 'lib/lifeapi.rb', line 49 def end_date @end_date end |
#start_date ⇒ Object
Returns the value of attribute start_date.
49 50 51 |
# File 'lib/lifeapi.rb', line 49 def start_date @start_date end |