Class: WWW::Mechanize::Page

Inherits:
Object
  • Object
show all
Defined in:
lib/magellan/extensions/mechanize_page.rb

Instance Method Summary collapse

Instance Method Details

#get_attributes(tag, attribute) ⇒ Object

:nodoc:



7
8
9
# File 'lib/magellan/extensions/mechanize_page.rb', line 7

def get_attributes(tag,attribute) # :nodoc:
  (self/tag).map{|alink| alink.attributes[attribute]}.compact
end

:nodoc:



3
4
5
# File 'lib/magellan/extensions/mechanize_page.rb', line 3

def links_to_other_documents(links_to_other_resources) # :nodoc:
  links_to_other_resources.map {|links_to_other_resource| get_attributes(links_to_other_resource.first,links_to_other_resource.last)}.flatten
end