1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/rss/rss.rb (RSS::Element#convert): added.

* lib/rss/rss.rb: convert -> need_convert.
* lib/rss/1.0.rb: ditto.
* lib/rss/0.9.rb: ditto.
* lib/rss/2.0.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kou 2005-02-02 13:00:31 +00:00
parent ab2b03033a
commit bd4fd26fda
6 changed files with 86 additions and 66 deletions

View file

@ -60,7 +60,7 @@ module RSS
tag_name_with_prefix(PREFIX)
end
def to_s(convert=true, indent=calc_indent)
def to_s(need_convert=true, indent=calc_indent)
rv = tag(indent, ns_declarations) do |next_indent|
[
channel_element(false, next_indent),
@ -70,7 +70,7 @@ module RSS
other_element(false, next_indent),
]
end
rv = @converter.convert(rv) if convert and @converter
rv = convert(rv) if need_convert
rv
end
@ -118,11 +118,11 @@ module RSS
@li = li
end
def to_s(convert=true, indent=calc_indent)
def to_s(need_convert=true, indent=calc_indent)
tag(indent) do |next_indent|
[
li_elements(convert, next_indent),
other_element(convert, next_indent),
li_elements(need_convert, next_indent),
other_element(need_convert, next_indent),
]
end
end
@ -177,9 +177,9 @@ module RSS
tag_name_with_prefix(PREFIX)
end
def to_s(convert=true, indent=calc_indent)
def to_s(need_convert=true, indent=calc_indent)
rv = tag(indent)
rv = @converter.convert(rv) if convert and @converter
rv = convert(rv) if need_convert
rv
end
@ -204,7 +204,7 @@ module RSS
end
[
[
["about", URI, true]
].each do |name, uri, required|
install_get_attribute(name, uri, required)
@ -234,7 +234,7 @@ module RSS
@about = about
end
def to_s(convert=true, indent=calc_indent)
def to_s(need_convert=true, indent=calc_indent)
rv = tag(indent) do |next_indent|
[
title_element(false, next_indent),
@ -246,8 +246,8 @@ module RSS
other_element(false, next_indent),
]
end
rv = @converter.convert(rv) if convert and @converter
rv
rv = convert(rv) if need_convert
rv
end
private
@ -305,9 +305,9 @@ module RSS
@resource = resource
end
def to_s(convert=true, indent=calc_indent)
def to_s(need_convert=true, indent=calc_indent)
rv = tag(indent)
rv = @converter.convert(rv) if convert and @converter
rv = convert(rv) if need_convert
rv
end
@ -342,9 +342,9 @@ module RSS
@resource = resource
end
def to_s(convert=true, indent=calc_indent)
def to_s(need_convert=true, indent=calc_indent)
rv = tag(indent)
rv = @converter.convert(rv) if convert and @converter
rv = convert(rv) if need_convert
rv
end
@ -384,11 +384,11 @@ module RSS
@Seq = seq
end
def to_s(convert=true, indent=calc_indent)
def to_s(need_convert=true, indent=calc_indent)
rv = tag(indent) do |next_indent|
[
Seq_element(convert, next_indent),
other_element(convert, next_indent),
Seq_element(need_convert, next_indent),
other_element(need_convert, next_indent),
]
end
end
@ -448,7 +448,7 @@ module RSS
@about = about
end
def to_s(convert=true, indent=calc_indent)
def to_s(need_convert=true, indent=calc_indent)
rv = tag(indent) do |next_indent|
[
title_element(false, next_indent),
@ -457,7 +457,7 @@ module RSS
other_element(false, next_indent),
]
end
rv = @converter.convert(rv) if convert and @converter
rv = convert(rv) if need_convert
rv
end
@ -518,7 +518,7 @@ module RSS
@about = about
end
def to_s(convert=true, indent=calc_indent)
def to_s(need_convert=true, indent=calc_indent)
rv = tag(indent) do |next_indent|
[
title_element(false, next_indent),
@ -527,7 +527,7 @@ module RSS
other_element(false, next_indent),
]
end
rv = @converter.convert(rv) if convert and @converter
rv = convert(rv) if need_convert
rv
end
@ -589,7 +589,7 @@ module RSS
@about = about
end
def to_s(convert=true, indent=calc_indent)
def to_s(need_convert=true, indent=calc_indent)
rv = tag(indent) do |next_indent|
[
title_element(false, next_indent),
@ -599,7 +599,7 @@ module RSS
other_element(false, next_indent),
]
end
rv = @converter.convert(rv) if convert and @converter
rv = convert(rv) if need_convert
rv
end