Class: OpeningHoursConverter::Interval
- Inherits:
-
Object
- Object
- OpeningHoursConverter::Interval
- Includes:
- Constants
- Defined in:
- lib/opening_hours_converter/interval.rb
Constant Summary
Constants included from Constants
Constants::DAYS, Constants::DAYS_MAX, Constants::IRL_DAYS, Constants::IRL_MONTHS, Constants::MINUTES_MAX, Constants::MONTH_END_DAY, Constants::OSM_DAYS, Constants::OSM_MONTHS, Constants::YEAR_DAYS_MAX
Instance Attribute Summary collapse
-
#day_end ⇒ Object
Returns the value of attribute day_end.
-
#day_start ⇒ Object
Returns the value of attribute day_start.
-
#end ⇒ Object
Returns the value of attribute end.
-
#start ⇒ Object
Returns the value of attribute start.
Instance Method Summary collapse
-
#initialize(day_start, min_start, day_end = 0, min_end = 0) ⇒ Interval
constructor
A new instance of Interval.
Constructor Details
#initialize(day_start, min_start, day_end = 0, min_end = 0) ⇒ Interval
Returns a new instance of Interval.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/opening_hours_converter/interval.rb', line 8 def initialize(day_start, min_start, day_end=0, min_end=0) @day_start = day_start @day_end = day_end @start = min_start @end = min_end if @day_end == 0 && @end == 0 @day_end = DAYS_MAX @end = MINUTES_MAX end end |
Instance Attribute Details
#day_end ⇒ Object
Returns the value of attribute day_end.
6 7 8 |
# File 'lib/opening_hours_converter/interval.rb', line 6 def day_end @day_end end |
#day_start ⇒ Object
Returns the value of attribute day_start.
6 7 8 |
# File 'lib/opening_hours_converter/interval.rb', line 6 def day_start @day_start end |
#end ⇒ Object
Returns the value of attribute end.
6 7 8 |
# File 'lib/opening_hours_converter/interval.rb', line 6 def end @end end |
#start ⇒ Object
Returns the value of attribute start.
6 7 8 |
# File 'lib/opening_hours_converter/interval.rb', line 6 def start @start end |