Class: WWW::Mechanize::Page
- Inherits:
-
Object
- Object
- WWW::Mechanize::Page
- Defined in:
- lib/magellan/extensions/mechanize_page.rb
Instance Method Summary collapse
- #get_attributes(tag, attribute) ⇒ Object
- #links_to_other_documents(links_to_other_resources) ⇒ Object
Instance Method Details
#get_attributes(tag, attribute) ⇒ Object
7 8 9 |
# File 'lib/magellan/extensions/mechanize_page.rb', line 7 def get_attributes(tag,attribute) (self/tag).map{|alink| alink.attributes[attribute]}.compact end |
#links_to_other_documents(links_to_other_resources) ⇒ Object
3 4 5 |
# File 'lib/magellan/extensions/mechanize_page.rb', line 3 def links_to_other_documents(links_to_other_resources) links_to_other_resources.map {|links_to_other_resource| get_attributes(links_to_other_resource.first,links_to_other_resource.last)}.flatten end |