diff options
| author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-07-19 14:54:52 +0000 |
|---|---|---|
| committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-07-19 14:54:52 +0000 |
| commit | 1d5e40eb288dcc4a6e4ca8932aaa42eade00f877 (patch) | |
| tree | f81cc12b6e33f45b4098e824eeb8e8c772bce026 /lib/rss/parser.rb | |
| parent | bca1514eb901f60248ce32273a9b9db5e8c6bf4a (diff) | |
| download | ruby-1d5e40eb288dcc4a6e4ca8932aaa42eade00f877.tar.gz ruby-1d5e40eb288dcc4a6e4ca8932aaa42eade00f877.tar.xz ruby-1d5e40eb288dcc4a6e4ca8932aaa42eade00f877.zip | |
* lib/rss/parser.rb, lib/rss/utils.rb: added documents.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@10570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rss/parser.rb')
| -rw-r--r-- | lib/rss/parser.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/rss/parser.rb b/lib/rss/parser.rb index 6f5696eda..033bc123a 100644 --- a/lib/rss/parser.rb +++ b/lib/rss/parser.rb @@ -7,6 +7,10 @@ module RSS class NotWellFormedError < Error attr_reader :line, :element + + # Create a new NotWellFormedError for an error at +line+ + # in +element+. If a block is given the return value of + # the block ends up in the error message. def initialize(line=nil, element=nil) message = "This is not well formed XML" if element or line @@ -85,6 +89,10 @@ module RSS end private + + # Try to get the XML associated with +rss+. + # Return +rss+ if it already looks like XML, or treat it as a URI, + # or a file to get the XML, def normalize_rss(rss) return rss if maybe_xml?(rss) |
