* 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
This commit is contained in:
kou 2006-06-18 08:58:18 +00:00
parent b79b5815f0
commit eb8598146d
9 changed files with 42 additions and 67 deletions

View file

@ -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)