Class: Roxbury::EmptyWorkingHours
Overview
Null object version of WorkingHours for holidays and other non working days
Instance Attribute Summary
Attributes inherited from WorkingHours
#begins_at, #ends_at
Instance Method Summary
collapse
#at_beginning, #at_end, parse, #quantity, #working_day?
Constructor Details
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
#ends_before?(_timestamp) ⇒ Boolean
16
17
18
|
# File 'lib/roxbury/empty_working_hours.rb', line 16
def ends_before? _timestamp
false
end
|
#include?(_timestamp) ⇒ Boolean
8
9
10
|
# File 'lib/roxbury/empty_working_hours.rb', line 8
def include? _timestamp
false
end
|
#non_working? ⇒ Boolean
20
21
22
|
# File 'lib/roxbury/empty_working_hours.rb', line 20
def non_working?
true
end
|
#starts_after?(_timestamp) ⇒ Boolean
12
13
14
|
# File 'lib/roxbury/empty_working_hours.rb', line 12
def starts_after? _timestamp
false
end
|