class FileGrabber::RemoteDocument
Public Class Methods
new(url)
click to toggle source
# File lib/filegrabber/remote_document.rb, line 7 def initialize url @params = URI.decode_www_form(url.query).to_h url.query = nil @url = url end
Public Instance Methods
download()
click to toggle source
# File lib/filegrabber/remote_document.rb, line 13 def download Log.info "FROM URL: #{@url}" Unirest.get(@url.to_s, parameters: @params).body end