diff options
author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-11-17 09:01:22 +0000 |
---|---|---|
committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-11-17 09:01:22 +0000 |
commit | 02c5d7e79a79b6fc09c31c90931c599b817eadba (patch) | |
tree | 5623af540ba5ec4725bc9abb0d7427d2223a4b32 /lib/rss/1.0.rb | |
parent | fb1d1a917d25a1e79282f269e6f70fdbe3ac76ac (diff) | |
download | ruby-02c5d7e79a79b6fc09c31c90931c599b817eadba.tar.gz |
* lib/rss/1.0.rb: added convenience method 'resources'.
* lib/rss/taxonomy.rb: ditto.
* test/rss/rss-assertions.rb: added test for 'resources'.
* test/rss/test_taxonomy.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rss/1.0.rb')
-rw-r--r-- | lib/rss/1.0.rb | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/rss/1.0.rb b/lib/rss/1.0.rb index be3ff7d411..5c7e3f5e62 100644 --- a/lib/rss/1.0.rb +++ b/lib/rss/1.0.rb @@ -438,12 +438,21 @@ module RSS end end + def resources + if @Seq + @Seq.lis.collect do |li| + li.resource + end + else + [] + end + end + private def children [@Seq] end - private def _tags rv = [] rv << [URI, 'Seq'] unless @Seq.nil? @@ -453,9 +462,7 @@ module RSS def rdf_validate(tags) _validate(tags, [["Seq", nil]]) end - end - end class Image < Element |