diff options
| author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-06-17 00:53:21 +0000 |
|---|---|---|
| committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-06-17 00:53:21 +0000 |
| commit | 1fde2760ceba793af22fc55d51195d7abb1fa33e (patch) | |
| tree | 58ed280d46280b524dab8b8a6f6f739461f97589 /lib/rss | |
| parent | 0667cd0b6378e413c28277a43442b6554c7b53e1 (diff) | |
| download | ruby-1fde2760ceba793af22fc55d51195d7abb1fa33e.tar.gz ruby-1fde2760ceba793af22fc55d51195d7abb1fa33e.tar.xz ruby-1fde2760ceba793af22fc55d51195d7abb1fa33e.zip | |
* lib/rss, test/rss: backported from trunk. (2005-11-16 - now)
* test/rss/test_2.0.rb: added RSS 2.0 tests.
* test/rss/rss-assertions.rb: extended XML stylesheet assertion.
* lib/rss/0.9.rb: added initialize method.
* test/rss/test_1.0.rb: cleanup.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@10296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rss')
| -rw-r--r-- | lib/rss/0.9.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/rss/0.9.rb b/lib/rss/0.9.rb index 56fdfb361..a4b2ba9b8 100644 --- a/lib/rss/0.9.rb +++ b/lib/rss/0.9.rb @@ -339,6 +339,17 @@ module RSS install_model(name, "?") end + def initialize(url=nil, title=nil, link=nil, width=nil, height=nil, + description=nil) + super() + @url = url + @title = title + @link = link + @width = width + @height = height + @description = description + end + def to_s(need_convert=true, indent=calc_indent) rv = tag(indent) do |next_indent| [ @@ -618,6 +629,14 @@ module RSS install_model(name, nil) end + def initialize(title=nil, description=nil, name=nil, link=nil) + super() + @title = title + @description = description + @name = name + @link = link + end + def to_s(need_convert=true, indent=calc_indent) rv = tag(indent) do |next_indent| [ |
