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
|
|
@ -84,6 +84,13 @@ module RSS
|
|||
@alternate
|
||||
end
|
||||
|
||||
def setup_maker(maker)
|
||||
xss = maker.xml_stylesheets.new_xml_stylesheet
|
||||
ATTRIBUTES.each do |attr|
|
||||
xss.__send__("#{attr}=", __send__(attr))
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
def guess_type(filename)
|
||||
/\.([^.]+)$/ =~ filename
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue