diff --git a/ex12.rb b/ex12.rb new file mode 100644 index 0000000..1fc78cc --- /dev/null +++ b/ex12.rb @@ -0,0 +1,10 @@ +require 'open-uri' + +open("http://www.ruby-lang.org/en") do |f| + f.each_line {|line| p line} + puts f.base_uri # + puts f.content_type # "text/html" + puts f.charset # "iso-8859-1" + puts f.content_encoding # [] + puts f.last_modified # Thu Dec 05 02:45:02 UTC 2002 +end