Class: UpstreamHelper
- Inherits:
-
ExtensionHelper
- Object
- SimpleDelegator
- ExtensionHelper
- UpstreamHelper
- Defined in:
- lib/jenkins_pipeline_builder/extensions/helpers/triggers/upstream_helper.rb
Instance Attribute Summary collapse
-
#color ⇒ Object
readonly
Returns the value of attribute color.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#ordinal ⇒ Object
readonly
Returns the value of attribute ordinal.
Attributes inherited from ExtensionHelper
Instance Method Summary collapse
-
#initialize(extension, params, builder) ⇒ UpstreamHelper
constructor
A new instance of UpstreamHelper.
Constructor Details
#initialize(extension, params, builder) ⇒ UpstreamHelper
Returns a new instance of UpstreamHelper.
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/jenkins_pipeline_builder/extensions/helpers/triggers/upstream_helper.rb', line 3 def initialize(extension, params, builder) super extension, params, builder case params[:status] when 'unstable' @name = 'UNSTABLE' @ordinal = '1' @color = 'yellow' when 'failed' @name = 'FAILURE' @ordinal = '2' @color = 'RED' else @name = 'SUCCESS' @ordinal = '0' @color = 'BLUE' end end |
Instance Attribute Details
#color ⇒ Object (readonly)
Returns the value of attribute color.
2 3 4 |
# File 'lib/jenkins_pipeline_builder/extensions/helpers/triggers/upstream_helper.rb', line 2 def color @color end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
2 3 4 |
# File 'lib/jenkins_pipeline_builder/extensions/helpers/triggers/upstream_helper.rb', line 2 def name @name end |
#ordinal ⇒ Object (readonly)
Returns the value of attribute ordinal.
2 3 4 |
# File 'lib/jenkins_pipeline_builder/extensions/helpers/triggers/upstream_helper.rb', line 2 def ordinal @ordinal end |