Sha256: 2a37abfc4bff58b36601673f30f660fe8d9f5345e6a28b95ceb741d07a9a7a93

Contents?: true

Size: 352 Bytes

Versions: 16

Compression:

Stored size: 352 Bytes

Contents

require 'xommelier/atom'

module Xommelier
  module Atom
    module LinksExtension
      def feed_url
        links.find { |link| link.rel == 'self' && link.type == 'application/atom+xml' }.try(:href)
      end

      def html_url
        links.find { |link| link.rel == 'alternate' && link.type == 'text/html' }.try(:href)
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
xommelier-0.1.19 lib/xommelier/atom/links_extension.rb
xommelier-0.1.18 lib/xommelier/atom/links_extension.rb
xommelier-0.1.16 lib/xommelier/atom/links_extension.rb
xommelier-0.1.15 lib/xommelier/atom/links_extension.rb
xommelier-0.1.14 lib/xommelier/atom/links_extension.rb
xommelier-0.1.13 lib/xommelier/atom/links_extension.rb
xommelier-0.1.12 lib/xommelier/atom/links_extension.rb
xommelier-0.1.11 lib/xommelier/atom/links_extension.rb
xommelier-0.1.10 lib/xommelier/atom/links_extension.rb
xommelier-0.1.9 lib/xommelier/atom/links_extension.rb
xommelier-0.1.8 lib/xommelier/atom/links_extension.rb
xommelier-0.1.7 lib/xommelier/atom/links_extension.rb
xommelier-0.1.6 lib/xommelier/atom/links_extension.rb
xommelier-0.1.5 lib/xommelier/atom/links_extension.rb
xommelier-0.1.4 lib/xommelier/atom/links_extension.rb
xommelier-0.1.3 lib/xommelier/atom/links_extension.rb