Class: BuildEval::Result::BuildResult

Inherits:
Object
  • Object
show all
Defined in:
lib/build_eval/result/build_result.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#statusObject (readonly)

Returns the value of attribute status


26
27
28
# File 'lib/build_eval/result/build_result.rb', line 26

def status
  @status
end

Class Method Details

.create(args) ⇒ Object


8
9
10
11
12
13
14
# File 'lib/build_eval/result/build_result.rb', line 8

def create(args)
  new(
    build_name:  args[:build_name],
    branch_name: args[:branch_name],
    status:      BuildEval::Result::Status.find(args[:status_name])
  )
end

.indeterminate(args) ⇒ Object


16
17
18
19
20
21
22
# File 'lib/build_eval/result/build_result.rb', line 16

def indeterminate(args)
  new(
    build_name:  args[:build_name],
    branch_name: args[:branch_name],
    status:      BuildEval::Result::Status::INDETERMINATE
  )
end

Instance Method Details

#to_sObject


42
43
44
# File 'lib/build_eval/result/build_result.rb', line 42

def to_s
  "#{@build_name}#{@branch_name ? ":#{@branch_name}" : ""} -> #{@status}"
end

#unsuccessful?Boolean

Returns:

  • (Boolean)

38
39
40
# File 'lib/build_eval/result/build_result.rb', line 38

def unsuccessful?
  @status.unsuccessful?
end