123456789_123456789_123456789_123456789_123456789_

Class: Rack::Lint::Wrapper::ErrorWrapper

Do not use. This class is for internal use only.
Relationships & Source Files
Inherits: Object
Defined in: lib/rack/lint.rb

Class Method Summary

Instance Method Summary

Constructor Details

.new(error) ⇒ ErrorWrapper

[ GitHub ]

  
# File 'lib/rack/lint.rb', line 543

def initialize(error)
  @error = error
end

Instance Method Details

#close(*args)

  • close must never be called on the error stream.

Raises:

[ GitHub ]

  
# File 'lib/rack/lint.rb', line 565

def close(*args)
  raise LintError, "rack.errors#close must not be called"
end

#flush

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

[ GitHub ]

  
# File 'lib/rack/lint.rb', line 560

def flush
  @error.flush
end

#puts(str)

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

[ GitHub ]

  
# File 'lib/rack/lint.rb', line 548

def puts(str)
  @error.puts str
end

#write(str)

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

Raises:

[ GitHub ]

  
# File 'lib/rack/lint.rb', line 553

def write(str)
  raise LintError, "rack.errors#write not called with a String" unless str.kind_of? String
  @error.write str
end