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
- .new(error) ⇒ ErrorWrapper constructor
Instance Method Summary
-
#close(*args)
#close must never be called on the error stream.
-
#flush
#flush must be called without arguments and must be called in order to make the error appear for sure.
-
#puts(str)
#puts must be called with a single argument that responds to
to_s.
-
#write(str)
#write must be called with a single argument that is a
String.
Constructor Details
.new(error) ⇒ ErrorWrapper
# File 'lib/rack/lint.rb', line 617
def initialize(error) @error = error end
Instance Method Details
#close(*args)
-
closemust never be called on the error stream.
# File 'lib/rack/lint.rb', line 638
def close(*args) raise LintError, "rack.errors#close must not be called" end
#flush
-
flushmust be called without arguments and must be called in order to make the error appear for sure.
# File 'lib/rack/lint.rb', line 633
def flush @error.flush end
#puts(str)
-
putsmust be called with a single argument that responds toto_s.
# File 'lib/rack/lint.rb', line 622
def puts(str) @error.puts str end
#write(str)
-
writemust be called with a single argument that is aString.
# File 'lib/rack/lint.rb', line 627
def write(str) raise LintError, "rack.errors#write not called with a String" unless str.kind_of? String @error.write str end