Class: Rack::Lint::ErrorWrapper

Inherits:
Object
  • Object
show all
Includes:
Assertion
Defined in:
rack/rack/lint.rb

Instance Method Summary (collapse)

Constructor Details

- (ErrorWrapper) initialize(error)

Returns a new instance of ErrorWrapper



402
403
404
# File 'rack/rack/lint.rb', line 402

def initialize(error)
  @error = error
end

Instance Method Details

- (void) assert(message, &block) Originally defined in module Assertion

- (void) close(*args)

  • close must never be called on the error stream.



424
425
426
# File 'rack/rack/lint.rb', line 424

def close(*args)
  assert("rack.errors#close must not be called") { false }
end

- (void) flush

  • flush must be called without arguments and must be called in order to make the error appear for sure.



419
420
421
# File 'rack/rack/lint.rb', line 419

def flush
  @error.flush
end

- (void) puts(str)

  • puts must be called with a single argument that responds to to_s.



407
408
409
# File 'rack/rack/lint.rb', line 407

def puts(str)
  @error.puts str
end

- (void) write(str)

  • write must be called with a single argument that is a String.



412
413
414
415
# File 'rack/rack/lint.rb', line 412

def write(str)
  assert("rack.errors#write not called with a String") { str.kind_of? String }
  @error.write str
end