Class: Gitlab::Ci::Badge::Custom::CustomBadge
- Defined in:
- lib/gitlab/ci/badge/custom/custom_badge.rb
Instance Attribute Summary collapse
-
#customization ⇒ Object
readonly
Returns the value of attribute customization.
-
#project ⇒ Object
readonly
Returns the value of attribute project.
Instance Method Summary collapse
- #entity ⇒ Object
-
#initialize(project, opts: {}) ⇒ CustomBadge
constructor
A new instance of CustomBadge.
- #metadata ⇒ Object
- #template ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(project, opts: {}) ⇒ CustomBadge
Returns a new instance of CustomBadge.
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/gitlab/ci/badge/custom/custom_badge.rb', line 10 def initialize(project, opts: {}) @project = project @customization = { key_width: opts[:key_width] ? opts[:key_width].to_i : nil, key_text: opts[:key_text], key_color: opts[:key_color], value_color: opts[:value_color], value_text: opts[:value_text], value_width: opts[:value_width] ? opts[:value_width].to_i : nil } end |
Instance Attribute Details
#customization ⇒ Object (readonly)
Returns the value of attribute customization.
8 9 10 |
# File 'lib/gitlab/ci/badge/custom/custom_badge.rb', line 8 def customization @customization end |
#project ⇒ Object (readonly)
Returns the value of attribute project.
8 9 10 |
# File 'lib/gitlab/ci/badge/custom/custom_badge.rb', line 8 def project @project end |