Class: ReeDatetime::NextOccurring

Inherits:
Object
  • Object
show all
Includes:
Ree::FnDSL
Defined in:
lib/ree_lib/packages/ree_datetime/package/ree_datetime/functions/next_occurring.rb

Instance Method Summary collapse

Instance Method Details

#call(date_time = nil, week_day) ⇒ Object



33
34
35
36
# File 'lib/ree_lib/packages/ree_datetime/package/ree_datetime/functions/next_occurring.rb', line 33

def call(date_time = nil, week_day)
  date_time = date_time || now
  change(next_occurring(date_time, week_day), hour: date_time.hour, min: date_time.min, sec: date_time.sec)
end