J
Josselin
I look into an array booked_days to see if an object d (which is a
date object) is included using :
if @booked_days.include?(d)
result is true/false, fine...
but is there any way to know if the object (d) is duplicated in the array ?
something like
if @booked_days.duplicated?(d) (getting true/false)
or
if @booked_days.count?(d) (getting the number of duplicated objects)
joss
date object) is included using :
if @booked_days.include?(d)
result is true/false, fine...
but is there any way to know if the object (d) is duplicated in the array ?
something like
if @booked_days.duplicated?(d) (getting true/false)
or
if @booked_days.count?(d) (getting the number of duplicated objects)
joss