Class: Spellr::Check
- Inherits:
-
Object
- Object
- Spellr::Check
- Includes:
- StringFormat
- Defined in:
- lib/spellr/check.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#files ⇒ Object
readonly
Returns the value of attribute files.
-
#reporter ⇒ Object
readonly
Returns the value of attribute reporter.
Instance Method Summary collapse
- #check ⇒ Object
- #exit_code ⇒ Object
-
#initialize(files: [], reporter: Spellr.config.reporter) ⇒ Check
constructor
A new instance of Check.
Methods included from StringFormat
aqua, bold, green, key, lighten, normal, pluralize, red
Constructor Details
Instance Attribute Details
#files ⇒ Object (readonly)
Returns the value of attribute files.
10 11 12 |
# File 'lib/spellr/check.rb', line 10 def files @files end |
#reporter ⇒ Object (readonly)
Returns the value of attribute reporter.
10 11 12 |
# File 'lib/spellr/check.rb', line 10 def reporter @reporter end |
Instance Method Details
#check ⇒ Object
24 25 26 27 28 29 30 31 32 |
# File 'lib/spellr/check.rb', line 24 def check if Spellr.config.parallel parallel_check else files.each { |file| check_and_count_file(file, reporter) } end reporter.finish end |
#exit_code ⇒ Object
14 15 16 |
# File 'lib/spellr/check.rb', line 14 def exit_code reporter.exit_code end |