Sha256: 9d60aeb4c25047e7d4f457ab9a8d459d37ac3819e8c5ea31cf2fb54d779476a1
Contents?: true
Size: 1.04 KB
Versions: 2
Compression:
Stored size: 1.04 KB
Contents
# coding: utf-8 ################################################ # © Alexander Semyonov, 2011—2013, MIT License # # Author: Alexander Semyonov <al@semyonov.us> # ################################################ require 'xommelier/atom' module Xommelier module Atom # Implements Feed Paging and Archiving # See RFC 5005 {http://tools.ietf.org/html/rfc5005.html} module History include Xommelier::Xml xmlns 'http://purl.org/syndication/history/1.0', as: :fh class Complete < Xml::Element; end class Archive < Xml::Element; end end class Feed may do element :complete, type: History::Complete element :archive, type: History::Archive end alias complete? complete alias archive? archive %w(first last previous next prev-archive next-archive current).each do |rel| define_method(:"#{rel.underscore}_feed_url") do links.find { |link| link.rel == rel && link.type == 'application/atom+xml' }.try(:href) end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
xommelier-0.1.32 | lib/xommelier/atom/history.rb |
xommelier-0.1.31 | lib/xommelier/atom/history.rb |