Sha256: 596b09095ee418ba9fea0944283bf18cb1e92e29029b503b194d2d0fba607d90
Contents?: true
Size: 267 Bytes
Versions: 1
Compression:
Stored size: 267 Bytes
Contents
class URLTempfile < Tempfile def initialize(url) @url = URI.parse(url) begin super('url', Dir.tmpdir) Net::HTTP.start(@url.host) do |http| resp = http.get(@url.path) self.write resp.body end ensure end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
moxify-0.1.3 | lib/moxify/url_tempfile.rb |