Class: Almanack::Representation::IcalFeed

Inherits:
Object
  • Object
show all
Defined in:
lib/almanack/representation/ical_feed.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(calendar) ⇒ IcalFeed

Returns a new instance of IcalFeed.



6
7
8
# File 'lib/almanack/representation/ical_feed.rb', line 6

def initialize(calendar)
  @calendar = calendar
end

Instance Attribute Details

#calendarObject (readonly)

Returns the value of attribute calendar.



4
5
6
# File 'lib/almanack/representation/ical_feed.rb', line 4

def calendar
  @calendar
end

Class Method Details

.from(calendar) ⇒ Object



18
19
20
# File 'lib/almanack/representation/ical_feed.rb', line 18

def self.from(calendar)
  self.new(calendar)
end

Instance Method Details

#icalObject



10
11
12
# File 'lib/almanack/representation/ical_feed.rb', line 10

def ical
  @ical ||= ical_calendar
end

#to_sObject



14
15
16
# File 'lib/almanack/representation/ical_feed.rb', line 14

def to_s
  ical.to_ical
end