Sha256: a6889f0a07e4ad7b3163f69affdccdfdadadb49d9f25ed951e3c378a1f025ce0
Contents?: true
Size: 1.05 KB
Versions: 22
Compression:
Stored size: 1.05 KB
Contents
require 'xommelier/atom' module Xommelier module Atom # Implments Atom Threading Extensions # See RFC 4685 {http://tools.ietf.org/html/rfc4685.html} module Threading include Xommelier::Xml xmlns 'http://purl.org/syndication/thread/1.0', as: :thr class InReplyTo < Xml::Element element_name 'in-reply-to' attribute :ref may do attribute :href, type: Uri attribute :type, type: String attribute :source end end end # Extends Atom elements class Entry may do element :in_reply_to, type: Threading::InReplyTo, as: Threading::InReplyTo.element_name element :total, type: Integer, ns: Threading.xmlns end def replies_feed_url links.find { |link| link.rel == 'replies' && link.type == 'application/atom+xml' }.try(:href) end end class Link may do attribute :count, type: Integer, ns: Threading.xmlns attribute :updated, type: Time, ns: Threading.xmlns end end end end
Version data entries
22 entries across 22 versions & 1 rubygems