Class: Montrose::ICal
- Inherits:
-
Object
- Object
- Montrose::ICal
- Defined in:
- lib/montrose/ical.rb
Class Method Summary collapse
-
.parse(ical) ⇒ Object
DTSTART;TZID=US-Eastern:19970902T090000 RRULE:FREQ=DAILY;INTERVAL=2.
Instance Method Summary collapse
-
#initialize(ical) ⇒ ICal
constructor
A new instance of ICal.
- #parse ⇒ Object
Constructor Details
#initialize(ical) ⇒ ICal
Returns a new instance of ICal.
11 12 13 |
# File 'lib/montrose/ical.rb', line 11 def initialize(ical) @ical = ical end |
Class Method Details
.parse(ical) ⇒ Object
DTSTART;TZID=US-Eastern:19970902T090000 RRULE:FREQ=DAILY;INTERVAL=2
7 8 9 |
# File 'lib/montrose/ical.rb', line 7 def self.parse(ical) new(ical).parse end |
Instance Method Details
#parse ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/montrose/ical.rb', line 15 def parse time_zone = extract_time_zone(@ical) Time.use_zone(time_zone) do Hash[*parse_properties(@ical)] end end |