Class: Camille::TypeErrorPrinter
- Inherits:
-
Object
- Object
- Camille::TypeErrorPrinter
- Defined in:
- lib/camille/type_error_printer.rb
Constant Summary collapse
- INDENTATION =
2
Instance Method Summary collapse
-
#initialize(error) ⇒ TypeErrorPrinter
constructor
A new instance of TypeErrorPrinter.
- #print(io = STDOUT) ⇒ Object
Constructor Details
#initialize(error) ⇒ TypeErrorPrinter
Returns a new instance of TypeErrorPrinter.
5 6 7 |
# File 'lib/camille/type_error_printer.rb', line 5 def initialize error @error = error end |
Instance Method Details
#print(io = STDOUT) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/camille/type_error_printer.rb', line 9 def print io = STDOUT if @error.basic? io.puts @error. else print_composite_error io, @error, 0 end end |