mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rss/rss.rb: RSS::Element#initialize accepts initial
attributes. * lib/rss/0.9.rb: ditto. * lib/rss/1.0.rb: ditto. * lib/rss/2.0.rb: ditto. * lib/rss/dublincore.rb: ditto. * lib/rss/image.rb: ditto. * lib/rss/taxonomy.rb: ditto. * lib/rss/trackback.rb: ditto. * lib/rss/utils.rb: added Utils.element_initialize_arguments? to detect backward compatibility initial arguments. * lib/rss/parser.rb: user initial attributes to initialize RSS::Element. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e6037e6111
commit
63c3fd6aa2
11 changed files with 256 additions and 120 deletions
|
@ -75,10 +75,14 @@ module RSS
|
|||
alias height= image_height=
|
||||
alias height image_height
|
||||
|
||||
def initialize(about=nil, resource=nil)
|
||||
super()
|
||||
self.about = about
|
||||
self.resource = resource
|
||||
def initialize(*args)
|
||||
if Utils.element_initialize_arguments?(args)
|
||||
super
|
||||
else
|
||||
super()
|
||||
self.about = args[0]
|
||||
self.resource = args[1]
|
||||
end
|
||||
end
|
||||
|
||||
def full_name
|
||||
|
@ -179,10 +183,14 @@ module RSS
|
|||
alias image_size= size=
|
||||
alias image_size size
|
||||
|
||||
def initialize(about=nil, size=nil)
|
||||
super()
|
||||
self.about = about
|
||||
self.size = size
|
||||
def initialize(*args)
|
||||
if Utils.element_initialize_arguments?(args)
|
||||
super
|
||||
else
|
||||
super()
|
||||
self.about = args[0]
|
||||
self.size = args[1]
|
||||
end
|
||||
end
|
||||
|
||||
def full_name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue