Class: Stowaway::Runner
- Inherits:
-
Object
- Object
- Stowaway::Runner
- Defined in:
- lib/stowaway/runner.rb
Instance Method Summary collapse
-
#initialize(options, locator, sweeper) ⇒ Runner
constructor
A new instance of Runner.
- #run ⇒ Object
Constructor Details
#initialize(options, locator, sweeper) ⇒ Runner
Returns a new instance of Runner.
8 9 10 11 12 |
# File 'lib/stowaway/runner.rb', line 8 def initialize(, locator, sweeper) @options = @locator = locator @sweeper = sweeper end |
Instance Method Details
#run ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/stowaway/runner.rb', line 14 def run path = @options.path print "\nLocating files ... " assets = @locator.find_all(path) print "#{assets.length} files located" blank_lines Dir.chdir(@options.path) puts "sweeping: #{Dir.pwd}" respond @sweeper.sweep(path, assets) end |