summaryrefslogtreecommitdiff
path: root/lib/rss/rss.rb
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-18 08:58:18 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-18 08:58:18 +0000
commiteb8598146dcaa23230deceddff91e862e26d1b0f (patch)
tree2da1b55d258823ae845f45437f75bc949a7505d2 /lib/rss/rss.rb
parentb79b5815f02f74338dcf6d1e9d072564bec78c4f (diff)
* lib/rss/rss.rb: RSS::Element#calc_indent became to be deprecated.
* lib/rss/0.9.rb: ditto. * lib/rss/1.0.rb: ditto. * lib/rss/image.rb: ditto. * lib/rss/taxonomy.rb: ditto. * lib/rss/trackback.rb: ditto. * test/rss/test_1.0.rb: removed RSS::Element.indent_size tests. * test/rss/test_2.0.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rss/rss.rb')
-rw-r--r--lib/rss/rss.rb17
1 files changed, 4 insertions, 13 deletions
diff --git a/lib/rss/rss.rb b/lib/rss/rss.rb
index c36cee0..3ef5db1 100644
--- a/lib/rss/rss.rb
+++ b/lib/rss/rss.rb
@@ -380,7 +380,7 @@ EOC
def def_content_only_to_s
module_eval(<<-EOC, *get_file_and_line_from_caller(2))
- def to_s(need_convert=true, indent=calc_indent)
+ def to_s(need_convert=true, indent='')
if @content
rv = tag(indent) do |next_indent|
h(@content)
@@ -445,7 +445,6 @@ EOC
@tag_name = name.split(/::/).last
@tag_name[0,1] = @tag_name[0,1].downcase
- @indent_size = name.split(/::/).size - 2
@have_content = false
def self.must_call_validators
@@ -547,11 +546,6 @@ EOC
def tag_name
@tag_name
end
-
- def indent_size
- @indent_size
- end
-
end
attr_accessor :do_validate
@@ -570,10 +564,6 @@ EOC
tag_name
end
- def indent_size
- self.class.indent_size
- end
-
def converter=(converter)
@converter = converter
targets = children.dup
@@ -682,9 +672,10 @@ EOC
def tag_name_with_prefix(prefix)
"#{prefix}:#{tag_name}"
end
-
+
+ # For backward compatibility
def calc_indent
- INDENT * (self.class.indent_size)
+ ''
end
def maker_target(maker)