class Shrine::Derivation::Url

  1. lib/shrine/plugins/derivation_endpoint.rb
Superclass: Command

Methods

Public Instance

  1. call

Public Instance methods

call(host: nil, prefix: nil, **options)
[show source]
    # File lib/shrine/plugins/derivation_endpoint.rb
306 def call(host: nil, prefix: nil, **options)
307   base_url = [host, *prefix].join("/")
308   path = path_identifier(metadata: options.delete(:metadata))
309 
310   if signer
311     url = [base_url, path].join("/")
312     signer.call(url, **options)
313   else
314     signed_part = signed_url("#{path}?#{query(**options)}")
315     [base_url, signed_part].join("/")
316   end
317 end