class UpstreamHelper

Attributes

color[R]
name[R]
ordinal[R]

Public Class Methods

new(extension, params, builder) click to toggle source
Calls superclass method ExtensionHelper::new
# 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