Class: JSHint4r::Reporter::Compilation
- Inherits:
-
Object
- Object
- JSHint4r::Reporter::Compilation
- Includes:
- JSHint4r::Reporter
- Defined in:
- lib/jshint4r/reporter/compilation.rb
Instance Method Summary collapse
-
#report(target, errors, verbose = false) ⇒ Object
- param
-
String target [param] Array errors [return] String or nil.
Methods included from JSHint4r::Reporter
Instance Method Details
#report(target, errors, verbose = false) ⇒ Object
- param
-
String target
- param
-
Array errors
- return
-
String or nil
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/jshint4r/reporter/compilation.rb', line 11 def report( target, errors, verbose = false ) if errors and errors.size > 0 errors.map { |error| e = key_symbolize( error ) sprintf( "%s:%s:%s: %s\n%s", target, e[:line], e[:character], e[:reason], e[:evidence] ) }.join("\n") << "\n" elsif verbose sprintf( "%s ... ok\n", target ) end end |