Class: Rack::Lint::ErrorWrapper
- Inherits:
-
Object
- Object
- Rack::Lint::ErrorWrapper
- Includes:
- Assertion
- 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.
-
Methods included from Assertion
Constructor Details
#initialize(error) ⇒ ErrorWrapper
Returns a new instance of ErrorWrapper.
394 395 396 |
# File 'lib/rack/lint.rb', line 394 def initialize(error) @error = error end |
Instance Method Details
#close(*args) ⇒ Object
-
close
must never be called on the error stream.
416 417 418 |
# File 'lib/rack/lint.rb', line 416 def close(*args) assert("rack.errors#close must not be called") { false } end |
#flush ⇒ Object
-
flush
must be called without arguments and must be called in order to make the error appear for sure.
411 412 413 |
# File 'lib/rack/lint.rb', line 411 def flush @error.flush end |
#puts(str) ⇒ Object
-
puts
must be called with a single argument that responds toto_s
.
399 400 401 |
# File 'lib/rack/lint.rb', line 399 def puts(str) @error.puts str end |
#write(str) ⇒ Object
-
write
must be called with a single argument that is a String.
404 405 406 407 |
# File 'lib/rack/lint.rb', line 404 def write(str) assert("rack.errors#write not called with a String") { str.kind_of? String } @error.write str end |