Sha256: 629dcd15fd33af07eb1632d8ee61d3d2ae340949c823675212af12be6932cf47

Contents?: true

Size: 354 Bytes

Versions: 3

Compression:

Stored size: 354 Bytes

Contents

module Roxbury
  # Null object version of WorkingHours for holidays and other non working days
  class EmptyWorkingHours < WorkingHours
    def initialize
      super begins_at: 0, ends_at: 0
    end

    def include? _timestamp
      false
    end

    def starts_after? _timestamp
      false
    end

    def non_working?
      true
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
roxbury-0.2.1 lib/roxbury/empty_working_hours.rb
roxbury-0.1.1 lib/roxbury/empty_working_hours.rb
roxbury-0.1.0 lib/roxbury/empty_working_hours.rb