Class: Steep::Drivers::SignatureErrorPrinter
- Inherits:
-
Object
- Object
- Steep::Drivers::SignatureErrorPrinter
- Defined in:
- lib/steep/drivers/signature_error_printer.rb
Instance Attribute Summary collapse
-
#stderr ⇒ Object
readonly
Returns the value of attribute stderr.
-
#stdout ⇒ Object
readonly
Returns the value of attribute stdout.
Instance Method Summary collapse
-
#initialize(stdout:, stderr:) ⇒ SignatureErrorPrinter
constructor
A new instance of SignatureErrorPrinter.
- #print_semantic_errors(errors) ⇒ Object
- #print_syntax_errors(errors) ⇒ Object
Constructor Details
#initialize(stdout:, stderr:) ⇒ SignatureErrorPrinter
Returns a new instance of SignatureErrorPrinter.
7 8 9 10 |
# File 'lib/steep/drivers/signature_error_printer.rb', line 7 def initialize(stdout:, stderr:) @stdout = stdout @stderr = stderr end |
Instance Attribute Details
#stderr ⇒ Object (readonly)
Returns the value of attribute stderr.
5 6 7 |
# File 'lib/steep/drivers/signature_error_printer.rb', line 5 def stderr @stderr end |
#stdout ⇒ Object (readonly)
Returns the value of attribute stdout.
4 5 6 |
# File 'lib/steep/drivers/signature_error_printer.rb', line 4 def stdout @stdout end |
Instance Method Details
#print_semantic_errors(errors) ⇒ Object
18 19 20 21 22 |
# File 'lib/steep/drivers/signature_error_printer.rb', line 18 def print_semantic_errors(errors) errors.each do |error| error.puts stderr end end |
#print_syntax_errors(errors) ⇒ Object
12 13 14 15 16 |
# File 'lib/steep/drivers/signature_error_printer.rb', line 12 def print_syntax_errors(errors) errors.each do |error| stderr.puts error. end end |