Class: Roxbury::EmptyWorkingHours
- Inherits:
-
WorkingHours
- Object
- WorkingHours
- Roxbury::EmptyWorkingHours
- Defined in:
- lib/roxbury/empty_working_hours.rb
Overview
Null object version of WorkingHours for holidays and other non working days
Instance Attribute Summary
Attributes inherited from WorkingHours
Instance Method Summary collapse
- #include?(_timestamp) ⇒ Boolean
-
#initialize ⇒ EmptyWorkingHours
constructor
A new instance of EmptyWorkingHours.
- #non_working? ⇒ Boolean
- #starts_after?(_timestamp) ⇒ Boolean
Methods inherited from WorkingHours
#at_beginning, #at_end, parse, #quantity, #working_day?
Constructor Details
#initialize ⇒ EmptyWorkingHours
Returns a new instance of EmptyWorkingHours.
4 5 6 |
# File 'lib/roxbury/empty_working_hours.rb', line 4 def initialize super begins_at: 0, ends_at: 0 end |
Instance Method Details
#include?(_timestamp) ⇒ Boolean
8 9 10 |
# File 'lib/roxbury/empty_working_hours.rb', line 8 def include? false end |
#non_working? ⇒ Boolean
16 17 18 |
# File 'lib/roxbury/empty_working_hours.rb', line 16 def non_working? true end |
#starts_after?(_timestamp) ⇒ Boolean
12 13 14 |
# File 'lib/roxbury/empty_working_hours.rb', line 12 def starts_after? false end |