Class: HamlI18nLint::Runner
- Inherits:
-
Object
- Object
- HamlI18nLint::Runner
- Defined in:
- lib/haml_i18n_lint/runner.rb
Overview
Run lint and report the result.
Instance Method Summary collapse
-
#initialize(options) ⇒ Runner
constructor
New runner to run lint with given options.
-
#run ⇒ true, false
Run lint and report the result.
Constructor Details
#initialize(options) ⇒ Runner
Returns new runner to run lint with given options.
8 9 10 11 12 |
# File 'lib/haml_i18n_lint/runner.rb', line 8 def initialize() @options = @config = ::HamlI18nLint::Config.new(@options) @linter = HamlI18nLint.linter.new(@config) end |
Instance Method Details
#run ⇒ true, false
Run lint and report the result
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/haml_i18n_lint/runner.rb', line 16 def run @config.files.map do |file| result = lint(file) if result.success? true else @config.report(result) false end end.all? end |