Class: Livecal::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/livecal/parser.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(calendar_source, from:, to:) ⇒ Parser

Returns a new instance of Parser.



13
14
15
16
17
# File 'lib/livecal/parser.rb', line 13

def initialize(calendar_source, from:, to:)
  @calendar_source = calendar_source
  @from = from
  @to = to
end

Class Method Details

.callObject



9
10
11
# File 'lib/livecal/parser.rb', line 9

def self.call(...)
  new(...).call
end

Instance Method Details

#callObject



19
20
21
# File 'lib/livecal/parser.rb', line 19

def call
  Calendar.new(events.collect { |event| Event.from_ical(event) })
end