class Fog::Storage::Artifactory::File
Public Instance Methods
body()
click to toggle source
# File lib/fog/artifactory/models/storage/file.rb, line 22 def body return attributes[:body] if attributes[:body] return '' unless last_modified attributes[:body] = service.client.get(download_uri) end
body=(new_body)
click to toggle source
# File lib/fog/artifactory/models/storage/file.rb, line 28 def body=(new_body) attributes[:body] = new_body end
destroy()
click to toggle source
# File lib/fog/artifactory/models/storage/file.rb, line 36 def destroy requires :directory, :key service.client.delete(download_uri) true end
directory()
click to toggle source
# File lib/fog/artifactory/models/storage/file.rb, line 32 def directory @directory end
download_uri()
click to toggle source
# File lib/fog/artifactory/models/storage/file.rb, line 56 def download_uri return attributes[:download_uri] if attributes[:download_uri].present? requires :directory, :key ::File.join(service.client.endpoint, attributes[:directory].key, attributes[:key]) end
public_url()
click to toggle source
# File lib/fog/artifactory/models/storage/file.rb, line 50 def public_url requires :directory, :key download_uri end
Also aliased as: url
save(_options = {})
click to toggle source
# File lib/fog/artifactory/models/storage/file.rb, line 42 def save(_options = {}) requires :body, :directory, :key endpoint = ::File.join(attributes[:directory].key, attributes[:key]) service.client.put(endpoint, attributes[:body]) true end