Class: Gitlab::GithubImport::Importer::LfsObjectImporter
- Inherits:
-
Object
- Object
- Gitlab::GithubImport::Importer::LfsObjectImporter
- Defined in:
- lib/gitlab/github_import/importer/lfs_object_importer.rb
Instance Attribute Summary collapse
-
#lfs_object ⇒ Object
readonly
Returns the value of attribute lfs_object.
-
#project ⇒ Object
readonly
Returns the value of attribute project.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(lfs_object, project, _) ⇒ LfsObjectImporter
constructor
lfs_object - An instance of ‘Gitlab::GithubImport::Representation::LfsObject`.
- #lfs_download_object ⇒ Object
Constructor Details
#initialize(lfs_object, project, _) ⇒ LfsObjectImporter
lfs_object - An instance of ‘Gitlab::GithubImport::Representation::LfsObject`. project - An instance of `Project`.
11 12 13 14 |
# File 'lib/gitlab/github_import/importer/lfs_object_importer.rb', line 11 def initialize(lfs_object, project, _) @lfs_object = lfs_object @project = project end |
Instance Attribute Details
#lfs_object ⇒ Object (readonly)
Returns the value of attribute lfs_object.
7 8 9 |
# File 'lib/gitlab/github_import/importer/lfs_object_importer.rb', line 7 def lfs_object @lfs_object end |
#project ⇒ Object (readonly)
Returns the value of attribute project.
7 8 9 |
# File 'lib/gitlab/github_import/importer/lfs_object_importer.rb', line 7 def project @project end |
Instance Method Details
#execute ⇒ Object
20 21 22 |
# File 'lib/gitlab/github_import/importer/lfs_object_importer.rb', line 20 def execute Projects::LfsPointers::LfsDownloadService.new(project, lfs_download_object).execute end |
#lfs_download_object ⇒ Object
16 17 18 |
# File 'lib/gitlab/github_import/importer/lfs_object_importer.rb', line 16 def lfs_download_object LfsDownloadObject.new(oid: lfs_object.oid, size: lfs_object.size, link: lfs_object.link) end |