slot_machine icon indicating copy to clipboard operation
slot_machine copied to clipboard

Timeslots object with 0 timeslots

Open galacto opened this issue 5 years ago • 0 comments

Hey, thanks for lib.

I was checking out this lib and I have a requirement where I subtract timeslot from timeslots. When I have only timeslot left and I try to substract it, lib throws error.

Simple test would be -

2.7.1 :037 > TimeSlots.new(0..2) - TimeSlot.new(0..2)
Traceback (most recent call last):
        1: from (irb):37
ArgumentError (ArgumentError)

would like to understand what you think about this use-case. Do you think Timeslots should initialise with empty range?

galacto avatar Jul 31 '20 13:07 galacto