ruby / rss

RSS reading and writing
BSD 2-Clause "Simplified" License
185 stars 36 forks source link

Can I add namespaced attributes? #38

Open ysksn opened 2 years ago

ysksn commented 2 years ago

Is it possible to add namespace content such as snf:logo ?

RSS::Maker.make('2.0') do |maker|
  maker.channel.title = 'Hello World!'
  # <snf:logo>
  #   <url>http://times.smartnews.co.jp/snlogo.png</url>
  # </snf:logo>
end

SmartFormat仕様書(RSS2.0準拠) https://publishers.smartnews.com/hc/ja/articles/360010977813-SmartFormat%E4%BB%95%E6%A7%98%E6%9B%B8-RSS2-0%E6%BA%96%E6%8B%A0-#channel

I appreciate any help you can provide.

kou commented 2 years ago

Yes.

We need to implement classes for the extension like https://github.com/ruby/rss/blob/master/lib/rss/itunes.rb and https://github.com/ruby/rss/blob/master/lib/rss/maker/itunes.rb .