diff options
| author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-02-13 14:21:21 +0000 |
|---|---|---|
| committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-02-13 14:21:21 +0000 |
| commit | 5e40d3c34cf266558e1ed8f368b6f985c578ae2b (patch) | |
| tree | be55e41a95ba2a3894b88556a8bf5f978a1f39a3 /lib/rss | |
| parent | f7f23c5b3e6cc349f6557537096cbff9089f8ace (diff) | |
| download | ruby-5e40d3c34cf266558e1ed8f368b6f985c578ae2b.tar.gz ruby-5e40d3c34cf266558e1ed8f368b6f985c578ae2b.tar.xz ruby-5e40d3c34cf266558e1ed8f368b6f985c578ae2b.zip | |
* lib/rss/dublincore.rb (RSS::DublicCoreModel#date{,=}): added
convenient methods.
* lib/rss/0.9.rb (RSS::Rss::Channel#date{,=}): ditto.
* lib/rss/2.0.rb (RSS::Rss::Channel::Item#date{,=}): ditto.
* test/rss/: added tests for the convenient methods.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rss')
| -rw-r--r-- | lib/rss/0.9.rb | 2 | ||||
| -rw-r--r-- | lib/rss/2.0.rb | 2 | ||||
| -rw-r--r-- | lib/rss/dublincore.rb | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/lib/rss/0.9.rb b/lib/rss/0.9.rb index 2bb59763d..c780cdb66 100644 --- a/lib/rss/0.9.rb +++ b/lib/rss/0.9.rb @@ -113,6 +113,8 @@ module RSS install_date_element(x, 'rfc822') install_model(x, occurs) end + alias date pubDate + alias date= pubDate= [ ["skipDays", "?"], diff --git a/lib/rss/2.0.rb b/lib/rss/2.0.rb index 6ed4fa02b..4bd46512f 100644 --- a/lib/rss/2.0.rb +++ b/lib/rss/2.0.rb @@ -78,6 +78,8 @@ EOT install_date_element(x, 'rfc822') install_model(x, occurs) end + alias date pubDate + alias date= pubDate= [ ["guid", '?'], diff --git a/lib/rss/dublincore.rb b/lib/rss/dublincore.rb index afdd4d392..016072edf 100644 --- a/lib/rss/dublincore.rb +++ b/lib/rss/dublincore.rb @@ -26,6 +26,8 @@ module RSS %w(date).each do |x| install_date_element("\#{DC_PREFIX}_\#{x}", 'w3cdtf', x) end + alias date #{DC_PREFIX}_date + alias date= #{DC_PREFIX}_date= EOC end |
