Class: BuildEval::Server::Decorator

Inherits:
Object
  • Object
show all
Defined in:
lib/build_eval/server/decorator.rb

Instance Method Summary collapse

Constructor Details

#initialize(delegate) ⇒ Decorator

Returns a new instance of Decorator.


6
7
8
# File 'lib/build_eval/server/decorator.rb', line 6

def initialize(delegate)
  @delegate = delegate
end

Instance Method Details

#build_result(build_name, branch_name) ⇒ Object


10
11
12
13
14
# File 'lib/build_eval/server/decorator.rb', line 10

def build_result(build_name, branch_name)
  @delegate.build_result(build_name, branch_name)
rescue StandardError
  BuildEval::Result::BuildResult.indeterminate(build_name: build_name, branch_name: branch_name)
end

#monitor(*build_configurations) ⇒ Object


16
17
18
# File 'lib/build_eval/server/decorator.rb', line 16

def monitor(*build_configurations)
  BuildEval::Monitor::Server.new(server: @delegate, build_configurations: build_configurations.flatten)
end