Class: IcsParser
- Inherits:
-
Object
- Object
- IcsParser
- Defined in:
- lib/ics_parser.rb
Class Method Summary collapse
Instance Method Summary collapse
- #events ⇒ Object
-
#initialize(calendar_content) ⇒ IcsParser
constructor
A new instance of IcsParser.
Constructor Details
#initialize(calendar_content) ⇒ IcsParser
Returns a new instance of IcsParser.
12 13 14 |
# File 'lib/ics_parser.rb', line 12 def initialize(calendar_content) @calendar_content = calendar_content end |
Class Method Details
.from_file(file) ⇒ Object
4 5 6 |
# File 'lib/ics_parser.rb', line 4 def self.from_file(file) from_string(File.read(file)) end |
Instance Method Details
#events ⇒ Object
16 17 18 |
# File 'lib/ics_parser.rb', line 16 def events EventParser.new(@calendar_content).events end |