module Shrine::Plugins::HostUrl::FileMethods
Public Instance Methods
url(**options)
click to toggle source
Calls superclass method
# File lib/shrine/plugins/host_url.rb, line 9 def url(**options) new_uri( URI.parse(super), uploader.opts[:host_url][:scheme], uploader.opts[:host_url][:host], uploader.opts[:host_url][:port] ) end
Private Instance Methods
new_uri(uri, new_scheme, new_host, new_port)
click to toggle source
# File lib/shrine/plugins/host_url.rb, line 20 def new_uri(uri, new_scheme, new_host, new_port) URI::HTTP.new( new_scheme, uri.userinfo, new_host, new_port, uri.registry, uri.path, uri.opaque, uri.query, uri.fragment ).to_s end