mechanize:Mechanize::Page::Image#page
以下のような HTML で
<html> <head> <title>image test</title> </head> <body> <img src="img1.png" width="256" height="128" alt="foo"> <img src="img2.png" width="200" height="100" alt="bar"> </body> </html>
>> require 'mechanize' => true >> agent = Mechanize.new => #<Mechanize:0xb7477540 ... >> page = agent.get('http://127.0.0.1:8080/test04_image.html') => #<Mechanize::Page {url #<URI::HTTP:0xb7473c24 URL:http://127.0.0.1:8080/test04_image.html>} {meta} {title "image test"} {iframes} {frames} {links} {forms}> >> page.images[0] => #<Mechanize::Page::Image:0xb746a1ec @page=#<Mechanize::Page {url #<URI::HTTP:0xb7473c24 URL:http://127.0.0.1:8080/test04_image.html>} {meta} {title "image test"} {iframes} {frames} {links} {forms}> , @node=#<Nokogiri::XML::Element:0x..fdba3511e name="img" attributes=[#<Nokogiri::XML::Attr:0x..fdba3484a name="src" value="img1.png">, #<Nokogiri::XML::Attr:0x..fdba34840 name="width" value="256">, #<Nokogiri::XML::Attr:0x..fdba34836 name="height" value="128">, #<Nokogiri::XML::Attr:0x..fdba3482c name="alt" value="foo">]>> >> page.images[0].page => #<Mechanize::Page {url #<URI::HTTP:0xb7473c24 URL:http://127.0.0.1:8080/test04_image.html>} {meta} {title "image test"} {iframes} {frames} {links} {forms}>