Class: API::Entities::Releases::Link

Inherits:
Grape::Entity
  • Object
show all
Defined in:
lib/api/entities/releases/link.rb

Instance Method Summary collapse

Instance Method Details

#direct_asset_urlObject


14
15
16
17
18
19
# File 'lib/api/entities/releases/link.rb', line 14

def direct_asset_url
  return object.url unless object.filepath

  release = object.release.present
  release.download_url(object.filepath)
end