Class: Gitlab::Ci::Status::Core

Inherits:
Object
  • Object
show all
Includes:
Allowable, Routing
Defined in:
lib/gitlab/ci/status/core.rb

Overview

Base abstract class for core status

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Allowable

#can?

Methods included from Routing

add_helpers, includes_helpers, redirect_legacy_paths, url_helpers

Constructor Details

#initialize(subject, user) ⇒ Core

Returns a new instance of Core.


14
15
16
17
# File 'lib/gitlab/ci/status/core.rb', line 14

def initialize(subject, user)
  @subject = subject
  @user = user
end

Instance Attribute Details

#subjectObject (readonly)

Returns the value of attribute subject


12
13
14
# File 'lib/gitlab/ci/status/core.rb', line 12

def subject
  @subject
end

#userObject (readonly)

Returns the value of attribute user


12
13
14
# File 'lib/gitlab/ci/status/core.rb', line 12

def user
  @user
end

Instance Method Details

#action_button_titleObject

Raises:

  • (NotImplementedError)

67
68
69
# File 'lib/gitlab/ci/status/core.rb', line 67

def action_button_title
  raise NotImplementedError
end

#action_iconObject

Raises:

  • (NotImplementedError)

51
52
53
# File 'lib/gitlab/ci/status/core.rb', line 51

def action_icon
  raise NotImplementedError
end

#action_methodObject

Raises:

  • (NotImplementedError)

59
60
61
# File 'lib/gitlab/ci/status/core.rb', line 59

def action_method
  raise NotImplementedError
end

#action_pathObject

Raises:

  • (NotImplementedError)

55
56
57
# File 'lib/gitlab/ci/status/core.rb', line 55

def action_path
  raise NotImplementedError
end

#action_titleObject

Raises:

  • (NotImplementedError)

63
64
65
# File 'lib/gitlab/ci/status/core.rb', line 63

def action_title
  raise NotImplementedError
end

#badge_tooltipObject

Hint that appears on the build badges


77
78
79
# File 'lib/gitlab/ci/status/core.rb', line 77

def badge_tooltip
  subject.status
end

#details_pathObject

Raises:

  • (NotImplementedError)

43
44
45
# File 'lib/gitlab/ci/status/core.rb', line 43

def details_path
  raise NotImplementedError
end

#faviconObject

Raises:

  • (NotImplementedError)

23
24
25
# File 'lib/gitlab/ci/status/core.rb', line 23

def favicon
  raise NotImplementedError
end

#groupObject


35
36
37
# File 'lib/gitlab/ci/status/core.rb', line 35

def group
  self.class.name.demodulize.underscore
end

#has_action?Boolean

Returns:

  • (Boolean)

47
48
49
# File 'lib/gitlab/ci/status/core.rb', line 47

def has_action?
  false
end

#has_details?Boolean

Returns:

  • (Boolean)

39
40
41
# File 'lib/gitlab/ci/status/core.rb', line 39

def has_details?
  false
end

#iconObject

Raises:

  • (NotImplementedError)

19
20
21
# File 'lib/gitlab/ci/status/core.rb', line 19

def icon
  raise NotImplementedError
end

#illustrationObject

Raises:

  • (NotImplementedError)

27
28
29
# File 'lib/gitlab/ci/status/core.rb', line 27

def illustration
  raise NotImplementedError
end

#labelObject

Raises:

  • (NotImplementedError)

31
32
33
# File 'lib/gitlab/ci/status/core.rb', line 31

def label
  raise NotImplementedError
end

#status_tooltipObject

Hint that appears on all the pipeline graph tooltips and builds on the right sidebar in Job detail view


72
73
74
# File 'lib/gitlab/ci/status/core.rb', line 72

def status_tooltip
  label
end