Method: Timely::DateChooser#initialize

Defined in:
lib/timely/date_chooser.rb

#initialize(options) ⇒ DateChooser

Returns a new instance of DateChooser.



17
18
19
20
21
22
23
24
25
26
27
# File 'lib/timely/date_chooser.rb', line 17

def initialize(options)
  @multiple_dates = options[:multiple_dates] || false
  @from     = process_date(options[:from])
  @to       = process_date(options[:to])
  @select   = options[:select]
  @dates    = options[:dates]
  @specific_dates = options[:specific_dates]
  @interval = options[:interval]
  @weekdays = WeekDays.new(options[:weekdays]) if @select == 'weekdays'
  validate
end