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.
-
#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 547
def initialize(error) @error = error end
Instance Method Details
#close(*args)
-
close
must never be called on the error stream.
# File 'lib/rack/lint.rb', line 569
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.
# File 'lib/rack/lint.rb', line 564
def flush @error.flush end
#puts(str)
-
puts
must be called with a single argument that responds toto_s
.
# File 'lib/rack/lint.rb', line 552
def puts(str) @error.puts str end
#write(str)
-
write
must be called with a single argument that is a String.
# File 'lib/rack/lint.rb', line 557
def write(str) raise LintError, "rack.errors#write not called with a String" unless str.kind_of? String @error.write str end