Class: Warder::CoffeeLintRunner::LintRunner
- Inherits:
-
Object
- Object
- Warder::CoffeeLintRunner::LintRunner
- Defined in:
- lib/warder/coffee_lint_runner/lint_runner.rb
Overview
responsible for coffeelint results
Instance Method Summary collapse
-
#initialize(file_or_path) ⇒ LintRunner
constructor
A new instance of LintRunner.
- #result ⇒ Object
Constructor Details
#initialize(file_or_path) ⇒ LintRunner
Returns a new instance of LintRunner.
8 9 10 |
# File 'lib/warder/coffee_lint_runner/lint_runner.rb', line 8 def initialize(file_or_path) @file_or_path = file_or_path end |
Instance Method Details
#result ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/warder/coffee_lint_runner/lint_runner.rb', line 12 def result if Dir.exist?(@file_or_path) Coffeelint.lint_dir(@file_or_path) else { @file_or_path => Coffeelint.lint_file(@file_or_path) } end end |