Class: Torganiser::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/torganiser/runner.rb

Overview

Runs the organisation process for a given array of files, extensions, and ignored files

Instance Method Summary collapse

Constructor Details

#initialize(scanner: scanner, arranger: arranger) ⇒ Runner

Returns a new instance of Runner.



5
6
7
8
# File 'lib/torganiser/runner.rb', line 5

def initialize(scanner: scanner, arranger: arranger)
  @scanner = scanner
  @arranger = arranger
end

Instance Method Details

#runObject



10
11
12
13
14
# File 'lib/torganiser/runner.rb', line 10

def run
  @scanner.each do |episode_file|
    arrange episode_file
  end
end