Module: Card::Set::All::Rss::RssFormat
- Extended by:
- Card::Set::AbstractFormat
- Defined in:
- tmpsets/set/mod006-basic_formats/all/rss.rb
Instance Attribute Summary collapse
-
#xml ⇒ Object
Returns the value of attribute xml.
Instance Method Summary collapse
- #initialize(card, args) ⇒ Object
- #pub_date ⇒ Object
- #raw_feed_items ⇒ Object
- #show(view, args) ⇒ Object
Instance Attribute Details
#xml ⇒ Object
Returns the value of attribute xml.
9 10 11 |
# File 'tmpsets/set/mod006-basic_formats/all/rss.rb', line 9 def xml @xml end |
Instance Method Details
#initialize(card, args) ⇒ Object
11 12 13 14 |
# File 'tmpsets/set/mod006-basic_formats/all/rss.rb', line 11 def initialize card, args super @xml = @parent ? @parent.xml : ::Builder::XmlMarkup.new end |
#pub_date ⇒ Object
65 66 67 68 69 |
# File 'tmpsets/set/mod006-basic_formats/all/rss.rb', line 65 def pub_date (card.updated_at || Time.zone.now).to_s(:rfc822) # updated_at fails on virtual # cards, because not all to_s's take args (just actual dates) end |
#raw_feed_items ⇒ Object
40 41 42 |
# File 'tmpsets/set/mod006-basic_formats/all/rss.rb', line 40 def raw_feed_items [card] end |
#show(view, args) ⇒ Object
16 17 18 19 |
# File 'tmpsets/set/mod006-basic_formats/all/rss.rb', line 16 def show view, args view ||= :feed render! view, args end |