aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rss/rss.rb
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-28 06:53:41 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-28 06:53:41 +0000
commitb684f87574166a42d3305c005896bf2aa7cd37b3 (patch)
tree3c0083d0e120e624822a05df86762d20e1ac2dbc /lib/rss/rss.rb
parent49d454ea2e2dc1d447b2dc290b6ea361ad18f979 (diff)
downloadruby-b684f87574166a42d3305c005896bf2aa7cd37b3.tar.gz
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@7401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rss/rss.rb')
-rw-r--r--lib/rss/rss.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/rss/rss.rb b/lib/rss/rss.rb
index b6f67b86e8..9bf94986e7 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