Class: Almanack::Representation::IcalFeed
- Inherits:
-
Object
- Object
- Almanack::Representation::IcalFeed
- Defined in:
- lib/almanack/representation/ical_feed.rb
Instance Attribute Summary collapse
-
#calendar ⇒ Object
readonly
Returns the value of attribute calendar.
Class Method Summary collapse
Instance Method Summary collapse
- #ical ⇒ Object
-
#initialize(calendar) ⇒ IcalFeed
constructor
A new instance of IcalFeed.
- #to_s ⇒ Object
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
#calendar ⇒ Object (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
#ical ⇒ Object
10 11 12 |
# File 'lib/almanack/representation/ical_feed.rb', line 10 def ical @ical ||= ical_calendar end |
#to_s ⇒ Object
14 15 16 |
# File 'lib/almanack/representation/ical_feed.rb', line 14 def to_s ical.to_ical end |