Class: Calagator::Source::Parser::Ical::EventMapper

Inherits:
Struct
  • Object
show all
Defined in:
app/models/calagator/source/parser/ical.rb

Overview

Converts a VEvent instance into an Event

Instance Method Summary collapse

Instance Method Details

#to_eventObject



58
59
60
61
62
63
64
65
66
# File 'app/models/calagator/source/parser/ical.rb', line 58

def to_event
  Event.new({
    title:       vevent.summary,
    description: vevent.description,
    url:         vevent.url,
    start_time:  vevent.start_time,
    end_time:    vevent.end_time,
  })
end