Class: LfsDownloadObject

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Validations
Defined in:
app/models/lfs_download_object.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(oid:, size:, link:) ⇒ LfsDownloadObject

Returns a new instance of LfsDownloadObject.


13
14
15
16
17
# File 'app/models/lfs_download_object.rb', line 13

def initialize(oid:, size:, link:)
  @oid = oid
  @size = size
  @link = link
end

Instance Attribute Details

Returns the value of attribute link


6
7
8
# File 'app/models/lfs_download_object.rb', line 6

def link
  @link
end

#oidObject

Returns the value of attribute oid


6
7
8
# File 'app/models/lfs_download_object.rb', line 6

def oid
  @oid
end

#sizeObject

Returns the value of attribute size


6
7
8
# File 'app/models/lfs_download_object.rb', line 6

def size
  @size
end

Instance Method Details

#sanitized_uriObject


19
20
21
# File 'app/models/lfs_download_object.rb', line 19

def sanitized_uri
  @sanitized_uri ||= Gitlab::UrlSanitizer.new(link)
end