Sha256: 2f774f7fc351b0d53cb1852cd9241b0457c5f2462c6a9b111593a9ef120d980f
Contents?: true
Size: 393 Bytes
Versions: 6
Compression:
Stored size: 393 Bytes
Contents
module Refinery module VimeoVideos class URLTempfile < Tempfile def initialize(url) @url = URI.parse(url) begin super('url', Dir.tmpdir, :encoding => 'ascii-8bit') Net::HTTP.start(@url.host) do |http| resp = http.get(@url.path) self.write resp.body end ensure end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems