# File lib/mechanize/file_response.rb, line 11 def read_body raise Mechanize::ResponseCodeError.new(self) unless File.exist? @file_path if directory? yield dir_body else open @file_path, 'rb' do |io| yield io.read end end end