diff options
| author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-28 06:53:41 +0000 |
|---|---|---|
| committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-28 06:53:41 +0000 |
| commit | bd7effe23b5c22f809fcda5706fbcf47e9c1e422 (patch) | |
| tree | 3c0083d0e120e624822a05df86762d20e1ac2dbc /lib/rss/rss.rb | |
| parent | c2d9a3c6d1fab35ebcd1dd0c2ae88657084fbc0d (diff) | |
| download | ruby-bd7effe23b5c22f809fcda5706fbcf47e9c1e422.tar.gz ruby-bd7effe23b5c22f809fcda5706fbcf47e9c1e422.tar.xz ruby-bd7effe23b5c22f809fcda5706fbcf47e9c1e422.zip | |
* lib/rss/rss.rb (RSS::NotSetError): added.
* lib/rss/maker/{1.0,0.9,2.0}.rb: changed RSS Maker to raise
RSS::NotSetError if required values of maker.channel are not
set.
* test/rss/test_maker_{1.0,0.9,2.0}.rb: changed tests to check RSS
Maker raises or not.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rss/rss.rb')
| -rw-r--r-- | lib/rss/rss.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/rss/rss.rb b/lib/rss/rss.rb index b6f67b86e..9bf94986e 100644 --- a/lib/rss/rss.rb +++ b/lib/rss/rss.rb @@ -144,6 +144,15 @@ module RSS end end + class NotSetError < Error + attr_reader :name, :variables + def initialize(name, variables) + @name = name + @variables = variables + super("required variables of #{@name} are not set: #{@variables.join(', ')}") + end + end + module BaseModel include Utils |
