Class: Shrine::Plugins::DownloadEndpoint::FileUrl

Inherits:
Object
  • Object
show all
Defined in:
lib/shrine/plugins/download_endpoint.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file) ⇒ FileUrl

Returns a new instance of FileUrl.


64
65
66
# File 'lib/shrine/plugins/download_endpoint.rb', line 64

def initialize(file)
  @file = file
end

Instance Attribute Details

#fileObject (readonly)

Returns the value of attribute file.


62
63
64
# File 'lib/shrine/plugins/download_endpoint.rb', line 62

def file
  @file
end

Instance Method Details

#call(host: self.host) ⇒ Object


68
69
70
# File 'lib/shrine/plugins/download_endpoint.rb', line 68

def call(host: self.host)
  [host, *prefix, path].join("/")
end