debian-mirror-gitlab/app/presenters/terraform/module_version_presenter.rb
2022-08-13 15:12:31 +05:30

50 lines
657 B
Ruby

# frozen_string_literal: true
module Terraform
class ModuleVersionPresenter < Gitlab::View::Presenter::Simple
attr_accessor :package, :system
def initialize(package, system)
@package = package
@system = system
end
def name
package.name
end
def provider
system
end
def providers
[
provider
]
end
def root
{
'dependencies' => []
}
end
def source
package&.project&.web_url
end
def submodules
[]
end
def version
package.version
end
def versions
[
version
]
end
end
end