Class: Pronto::Runners

Inherits:
Object
  • Object
show all
Defined in:
lib/pronto/runners.rb

Instance Method Summary collapse

Constructor Details

#initialize(runners = Runner.runners, config = Config.new) ⇒ Runners

Returns a new instance of Runners.



3
4
5
6
# File 'lib/pronto/runners.rb', line 3

def initialize(runners = Runner.runners, config = Config.new)
  @runners = runners
  @config = config
end

Instance Method Details

#run(patches) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/pronto/runners.rb', line 8

def run(patches)
  patches = reject_excluded(patches)
  return [] unless patches.any?

  @runners.map { |runner| runner.new.run(patches, patches.commit) }
    .flatten.compact
end