Class: Rack::Lint::Wrapper::ErrorWrapper
- Inherits:
-
Object
- Object
- Rack::Lint::Wrapper::ErrorWrapper
- Defined in:
- lib/rack/lint.rb
Instance Method Summary collapse
-
#close(*args) ⇒ Object
-
close
must never be called on the error stream.
-
-
#flush ⇒ Object
-
flush
must be called without arguments and must be called in order to make the error appear for sure.
-
-
#initialize(error) ⇒ ErrorWrapper
constructor
A new instance of ErrorWrapper.
-
#puts(str) ⇒ Object
-
puts
must be called with a single argument that responds toto_s
.
-
-
#write(str) ⇒ Object
-
write
must be called with a single argument that is a String.
-
Constructor Details
#initialize(error) ⇒ ErrorWrapper
Returns a new instance of ErrorWrapper.
541 542 543 |
# File 'lib/rack/lint.rb', line 541 def initialize(error) @error = error end |
Instance Method Details
#close(*args) ⇒ Object
-
close
must never be called on the error stream.
563 564 565 |
# File 'lib/rack/lint.rb', line 563 def close(*args) raise LintError, "rack.errors#close must not be called" end |
#flush ⇒ Object
-
flush
must be called without arguments and must be called in order to make the error appear for sure.
558 559 560 |
# File 'lib/rack/lint.rb', line 558 def flush @error.flush end |
#puts(str) ⇒ Object
-
puts
must be called with a single argument that responds toto_s
.
546 547 548 |
# File 'lib/rack/lint.rb', line 546 def puts(str) @error.puts str end |
#write(str) ⇒ Object
-
write
must be called with a single argument that is a String.
551 552 553 554 |
# File 'lib/rack/lint.rb', line 551 def write(str) raise LintError, "rack.errors#write not called with a String" unless str.kind_of? String @error.write str end |