aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rss/rss.rb
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-13 11:02:03 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-13 11:02:03 +0000
commitc0306157d9dbb12447ba5288b8a2db73b2beef11 (patch)
tree7c900356e107f5a66c051a535e9dfab8b103eca8 /lib/rss/rss.rb
parent82482f67e25e8239d17a0ee9d209dca3c6fbb2f9 (diff)
downloadruby-c0306157d9dbb12447ba5288b8a2db73b2beef11.tar.gz
* test/rss/test_trackback.rb: added tests for TrackBack with RSS
2.0. * test/rss/common.rb: added methods make RSS 2.0. * lib/rss/trackback.rb: TrackBack API is decided. * lib/rss/rss.rb: RSS::VERSION 0.0.7 -> 0.0.8 * lib/rss/parser.rb, lib/rss/rss.rb: replaced $DEBUG by RSS::DEBUG. * lib/rss/2.0.rb: removed RSS 2.0 URI. Because RSS 2.0 doesn't have URI. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rss/rss.rb')
-rw-r--r--lib/rss/rss.rb14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/rss/rss.rb b/lib/rss/rss.rb
index 2dfc0d1ecc..d84b51472d 100644
--- a/lib/rss/rss.rb
+++ b/lib/rss/rss.rb
@@ -5,7 +5,9 @@ require "rss/converter"
module RSS
- VERSION = "0.0.7"
+ VERSION = "0.0.8"
+
+ DEBUG = false
class Error < StandardError; end
@@ -363,6 +365,7 @@ EOC
def initialize(do_validate=true)
@converter = nil
+ @output_encoding = nil
@do_validate = do_validate
initialize_variables
end
@@ -393,6 +396,7 @@ EOC
instance_eval("@#{variable_name} = nil")
end
initialize_have_children_elements
+ @content = "" if self.class.have_content?
end
def initialize_have_children_elements
@@ -423,7 +427,7 @@ EOC
end
must_call_validators = self.class::must_call_validators
tags = tag_filter(tags.dup)
- p tags if $DEBUG
+ p tags if DEBUG
self.class::NSPOOL.each do |prefix, uri|
if tags.has_key?(uri) and !must_call_validators.has_key?(uri)
meth = "#{prefix}_validate"
@@ -463,7 +467,7 @@ EOC
model.each_with_index do |elem, i|
- if $DEBUG
+ if DEBUG
p "before"
p tags
p elem
@@ -478,7 +482,7 @@ EOC
end
end
- if $DEBUG
+ if DEBUG
p "mid"
p count
end
@@ -523,7 +527,7 @@ EOC
end
end
- if $DEBUG
+ if DEBUG
p "after"
p not_shift
p do_redo