Class: BuildEval::Result::ServerResult

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

Instance Method Summary collapse

Constructor Details

#initialize(server, build_results) ⇒ ServerResult

Returns a new instance of ServerResult.


6
7
8
9
# File 'lib/build_eval/result/server_result.rb', line 6

def initialize(server, build_results)
  @server        = server
  @build_results = build_results
end

Instance Method Details

#statusObject


11
12
13
# File 'lib/build_eval/result/server_result.rb', line 11

def status
  BuildEval::Result::Status.effective_status(@build_results.map(&:status))
end

#to_sObject


19
20
21
# File 'lib/build_eval/result/server_result.rb', line 19

def to_s
  "#{@server}: #{@build_results.map(&:to_s).join(", ")}"
end

#unsuccessfulObject


15
16
17
# File 'lib/build_eval/result/server_result.rb', line 15

def unsuccessful
  @build_results.find_all(&:unsuccessful?)
end