Class: Ci::BuildMetadataPresenter

Inherits:
Gitlab::View::Presenter::Delegated show all
Defined in:
app/presenters/ci/build_metadata_presenter.rb

Constant Summary collapse

TIMEOUT_SOURCES =
{
    unknown_timeout_source: nil,
    project_timeout_source: 'project',
    runner_timeout_source: 'runner',
    job_timeout_source: 'job'
}.freeze

Instance Attribute Summary

Attributes included from Gitlab::View::Presenter::Base

#subject

Instance Method Summary collapse

Methods inherited from Gitlab::View::Presenter::Delegated

#initialize

Methods included from Gitlab::View::Presenter::Base

#can?, #declarative_policy_delegate, #is_a?, #present, #url_builder, #web_path, #web_url

Methods included from Gitlab::Allowable

#can?

Methods included from Gitlab::Routing

add_helpers, includes_helpers, redirect_legacy_paths, url_helpers

Constructor Details

This class inherits a constructor from Gitlab::View::Presenter::Delegated

Instance Method Details

#timeout_sourceObject


14
15
16
17
18
19
# File 'app/presenters/ci/build_metadata_presenter.rb', line 14

def timeout_source
  return unless .timeout_source?

  TIMEOUT_SOURCES[.timeout_source.to_sym] ||
    .timeout_source
end