Class: ConsoleErrorReporter
- Inherits:
-
Object
- Object
- ConsoleErrorReporter
- Defined in:
- lib/InternalW3cValidation.rb
Instance Method Summary collapse
- #end ⇒ Object
-
#initialize ⇒ ConsoleErrorReporter
constructor
A new instance of ConsoleErrorReporter.
- #show(error) ⇒ Object
Constructor Details
#initialize ⇒ ConsoleErrorReporter
Returns a new instance of ConsoleErrorReporter.
30 31 32 |
# File 'lib/InternalW3cValidation.rb', line 30 def initialize @error_count = 0 end |
Instance Method Details
#end ⇒ Object
39 40 41 42 43 |
# File 'lib/InternalW3cValidation.rb', line 39 def end puts "-----------------------------------------------" puts "There are #{@error_count} W3c Validation Errors" puts "-----------------------------------------------" end |
#show(error) ⇒ Object
34 35 36 37 |
# File 'lib/InternalW3cValidation.rb', line 34 def show(error) @error_count += 1 puts error end |