# File lib/icalendar/parser.rb, line 41 def initialize(src) # Setup the parser method hash table setup_parsers() if src.respond_to?(:gets) @file = src elsif (not src.nil?) and src.respond_to?(:to_s) @file = StringIO.new(src.to_s, 'r') else raise ArgumentError, "CalendarParser.new cannot be called with a #{src.class} type!" end @prev_line = @file.gets @prev_line.chomp! unless @prev_line.nil? @@logger.debug("New Calendar Parser: #{@file.inspect}") end