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.



82
83
84
# File 'lib/shrine/plugins/download_endpoint.rb', line 82

def initialize(file)
  @file = file
end

Instance Attribute Details

#fileObject (readonly)

Returns the value of attribute file.



80
81
82
# File 'lib/shrine/plugins/download_endpoint.rb', line 80

def file
  @file
end

Instance Method Details

#call(host: self.host) ⇒ Object



86
87
88
# File 'lib/shrine/plugins/download_endpoint.rb', line 86

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