Module: Atom::HasLinks

Included in:
Entry, Feed
Defined in:
lib/atom/element.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



648
649
650
# File 'lib/atom/element.rb', line 648

def HasLinks.included(klass)
  klass.atom_elements :link, :links, Atom::Link
end

Instance Method Details



652
653
654
655
656
# File 'lib/atom/element.rb', line 652

def find_link(criteria)
  self.links.find do |l|
    criteria.all? { |k,v| l.send(k) == v }
  end
end