Class: Spellr::Check
- Inherits:
-
Object
- Object
- Spellr::Check
- Defined in:
- lib/spellr/check.rb
Instance Attribute Summary collapse
-
#exit_code ⇒ Object
readonly
Returns the value of attribute exit_code.
-
#files ⇒ Object
readonly
Returns the value of attribute files.
-
#reporter ⇒ Object
readonly
Returns the value of attribute reporter.
Instance Method Summary collapse
- #check ⇒ Object
-
#initialize(files: [], reporter: Spellr.config.reporter) ⇒ Check
constructor
A new instance of Check.
Constructor Details
Instance Attribute Details
#exit_code ⇒ Object (readonly)
Returns the value of attribute exit_code.
18 19 20 |
# File 'lib/spellr/check.rb', line 18 def exit_code @exit_code end |
#files ⇒ Object (readonly)
Returns the value of attribute files.
19 20 21 |
# File 'lib/spellr/check.rb', line 19 def files @files end |
#reporter ⇒ Object (readonly)
Returns the value of attribute reporter.
19 20 21 |
# File 'lib/spellr/check.rb', line 19 def reporter @reporter end |
Instance Method Details
#check ⇒ Object
27 28 29 30 31 32 33 34 35 |
# File 'lib/spellr/check.rb', line 27 def check checked = 0 files.each do |file| check_file(file) checked += 1 end reporter.finish(checked) if reporter.respond_to?(:finish) end |