class Refinery::VimeoVideos::URLTempfile
Public Class Methods
new(url)
click to toggle source
Calls superclass method
# File lib/refinerycms-vimeo-videos/url_tempfile.rb, line 5 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