Module: Icalendar::Recurrence::EventExtensions

Included in:
Event
Defined in:
lib/icalendar/recurrence/event_extensions.rb

Instance Method Summary collapse

Instance Method Details

#all_occurrencesObject



20
21
22
# File 'lib/icalendar/recurrence/event_extensions.rb', line 20

def all_occurrences
  schedule.all_occurrences
end

#endObject



12
13
14
# File 'lib/icalendar/recurrence/event_extensions.rb', line 12

def end
  dtend
end

#occurrences_between(begin_time, closing_time, spans: false) ⇒ Object



16
17
18
# File 'lib/icalendar/recurrence/event_extensions.rb', line 16

def occurrences_between(begin_time, closing_time, spans: false)
  schedule.occurrences_between(begin_time, closing_time, spans: spans)
end

#scheduleObject



24
25
26
# File 'lib/icalendar/recurrence/event_extensions.rb', line 24

def schedule
  @schedule ||= Schedule.new(self)
end

#startObject



4
5
6
# File 'lib/icalendar/recurrence/event_extensions.rb', line 4

def start
  dtstart
end

#start_timeObject



8
9
10
# File 'lib/icalendar/recurrence/event_extensions.rb', line 8

def start_time
  TimeUtil.to_time(start)
end

#tzidObject



28
29
30
31
32
33
# File 'lib/icalendar/recurrence/event_extensions.rb', line 28

def tzid
  ugly_tzid = dtstart.ical_params.fetch("tzid", nil)
  return nil if ugly_tzid.nil?

  Array(ugly_tzid).first.to_s.gsub(/^(["'])|(["'])$/, "")
end