Sha256: 0227c63a28c8e7f885076b847b778f82c385ae61800e94b1aae621bcab2c2c17

Contents?: true

Size: 407 Bytes

Versions: 3

Compression:

Stored size: 407 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 ends_before? _timestamp
      false
    end

    def non_working?
      true
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
roxbury-0.3.0 lib/roxbury/empty_working_hours.rb
roxbury-0.2.3 lib/roxbury/empty_working_hours.rb
roxbury-0.2.2 lib/roxbury/empty_working_hours.rb