Module: Livecal
- Defined in:
- lib/livecal.rb,
lib/livecal/event.rb,
lib/livecal/parser.rb,
lib/livecal/calendar.rb,
lib/livecal/calendar_source.rb,
lib/livecal/recurring_events.rb
Defined Under Namespace
Classes: Calendar, CalendarSource, Event, Parser, RecurringEvents
Class Method Summary
collapse
Class Method Details
.from_file(path, from:, to:) ⇒ Object
11
12
13
|
# File 'lib/livecal.rb', line 11
def self.from_file(path, from:, to:)
from_sources CalendarSource.from_file(path), from: from, to: to
end
|
.from_sources(sources, from:, to:) ⇒ Object
19
20
21
|
# File 'lib/livecal.rb', line 19
def self.from_sources(sources, from:, to:)
sources.collect { |source| Parser.call(source, from: from, to: to) }
end
|
.from_string(contents, from:, to:) ⇒ Object
15
16
17
|
# File 'lib/livecal.rb', line 15
def self.from_string(contents, from:, to:)
from_sources CalendarSource.from_string(contents), from: from, to: to
end
|
.from_url(url, from:, to:) ⇒ Object
7
8
9
|
# File 'lib/livecal.rb', line 7
def self.from_url(url, from:, to:)
from_sources CalendarSource.from_url(url), from: from, to: to
end
|