Class RSS::Parser
In: rss/parser.rb
Parent: Object

Methods

Public Class methods

[Source]

# File rss/parser.rb, line 59
      def default_parser
        @@default_parser || AVAILABLE_PARSERS.first
      end

Set @@default_parser to new_value if it is one of the available parsers. Else raise NotValidXMLParser error.

[Source]

# File rss/parser.rb, line 65
      def default_parser=(new_value)
        if AVAILABLE_PARSERS.include?(new_value)
          @@default_parser = new_value
        else
          raise NotValidXMLParser.new(new_value)
        end
      end

[Source]

# File rss/parser.rb, line 87
    def initialize(rss, parser_class=self.class.default_parser)
      @parser = parser_class.new(normalize_rss(rss))
    end

[Source]

# File rss/parser.rb, line 73
      def parse(rss, do_validate=true, ignore_unknown_element=true,
                parser_class=default_parser)
        parser = new(rss, parser_class)
        parser.do_validate = do_validate
        parser.ignore_unknown_element = ignore_unknown_element
        parser.parse
      end

[Validate]

ruby-doc.org is hosted and maintained by James Britt and Happy Camper Studios, a Ruby application development company in Phoenix, Arizona. The site was created in 2002 as part of the Ruby Documentation Project to promote the Ruby language and to help other Ruby hackers.

Documentation content on ruby-doc.org is provided by remarkable members of the Ruby community.

For more information on the Ruby programming language, visit ruby-lang.org.

Want to help improve Ruby's API docs? See Ruby Documentation Guidelines.