Class: ReeDate::Change

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

Instance Method Summary collapse

Instance Method Details

#call(date, **opts) ⇒ Object



21
22
23
24
25
26
27
# File 'lib/ree_lib/packages/ree_date/package/ree_date/functions/change.rb', line 21

def call(date, **opts)
  Date.new(
    opts[:year] || date.year,
    opts[:month] || date.month,
    opts[:day] || date.day
  )
end