Class: Sleet::BuildSelector

Inherits:
Object
  • Object
show all
Defined in:
lib/sleet/build_selector.rb

Instance Method Summary collapse

Constructor Details

#initialize(repo:, job_name:) ⇒ BuildSelector

Returns a new instance of BuildSelector.



5
6
7
8
# File 'lib/sleet/build_selector.rb', line 5

def initialize(repo:, job_name:)
  @repo = repo
  @job_name = job_name
end

Instance Method Details

#buildObject



10
11
12
# File 'lib/sleet/build_selector.rb', line 10

def build
  @build ||= repo.build_for(chosen_build_num)
end

#validate!Object



14
15
16
17
# File 'lib/sleet/build_selector.rb', line 14

def validate!
  must_find_a_build!
  chosen_build_must_have_input_file!
end