examples/hash.rb in pdf-reader-0.11.0.alpha vs examples/hash.rb in pdf-reader-0.12.0.alpha

- old
+ new

@@ -1,12 +1,12 @@ #!/usr/bin/env ruby # coding: utf-8 # get direct access to PDF objects -# -$LOAD_PATH.unshift(File.dirname(__FILE__) + '/../lib') require 'pdf/reader' -filename = File.dirname(__FILE__) + "/../specs/data/cairo-unicode.pdf" -hash = PDF::Reader::ObjectHash.new(filename) -puts hash[3] +filename = File.expand_path(File.dirname(__FILE__)) + "/../spec/data/cairo-unicode.pdf" + +reader = PDF::Reader.new(filename) +puts reader.objects[3] +puts reader.objects[4]