Class: Pelusa::Runner
- Inherits:
-
Object
- Object
- Pelusa::Runner
- Defined in:
- lib/pelusa/runner.rb
Instance Method Summary collapse
-
#initialize(lints, reporter) ⇒ Runner
constructor
Public: Initializes an Analyzer.
-
#run(files) ⇒ Object
Public: Runs the analyzer on a set of files.
-
#run_file(file) ⇒ Object
Public: Runs the analyzer on a single file.
Constructor Details
#initialize(lints, reporter) ⇒ Runner
Public: Initializes an Analyzer.
lints - The lints to check the code for. reporter - The Reporter to use. Will be used to report back the results in
methods such as #run.
8 9 10 11 |
# File 'lib/pelusa/runner.rb', line 8 def initialize(lints, reporter) @lints = lints @reporter = reporter end |
Instance Method Details
#run(files) ⇒ Object
Public: Runs the analyzer on a set of files.
Returns an Array of Reports of those file runs.
16 17 18 19 20 |
# File 'lib/pelusa/runner.rb', line 16 def run(files) Array(files).map do |file| run_file(file) end end |