mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rss/{0.9,1.0,2.0,trackback,xml-stylesheet}.rb: added
#setup_maker. * test/rss/test_setup_maker_*.rb: added tests for #setup_maker. * lib/rss/maker/base.rb(RSS::Maker::Items#max_size=): supported output item size limitation. * sample/rss/blend.rb: added sample for RSS Maker. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0a93165e16
commit
2572d5e20e
12 changed files with 1066 additions and 14 deletions
|
@ -274,6 +274,14 @@ module RSS
|
|||
]
|
||||
end
|
||||
|
||||
def maker_target(maker)
|
||||
maker.channel
|
||||
end
|
||||
|
||||
def setup_maker_attributes(channel)
|
||||
channel.about = self.about
|
||||
end
|
||||
|
||||
class Image < Element
|
||||
|
||||
include RSS10
|
||||
|
@ -469,6 +477,10 @@ module RSS
|
|||
["#{PREFIX}:about", true, "about"]
|
||||
]
|
||||
end
|
||||
|
||||
def maker_target(maker)
|
||||
maker.image
|
||||
end
|
||||
end
|
||||
|
||||
class Item < Element
|
||||
|
@ -535,6 +547,10 @@ module RSS
|
|||
["#{PREFIX}:about", true, "about"]
|
||||
]
|
||||
end
|
||||
|
||||
def maker_target(maker)
|
||||
maker.items.new_item
|
||||
end
|
||||
end
|
||||
|
||||
class Textinput < Element
|
||||
|
@ -604,6 +620,10 @@ module RSS
|
|||
["#{PREFIX}:about", true, "about"]
|
||||
]
|
||||
end
|
||||
|
||||
def maker_target(maker)
|
||||
maker.textinput
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue