Class: Rack::Lint::Wrapper::ErrorWrapper
- Defined in:
- vendor/bundler/ruby/3.4.0/bundler/gems/rack-40d68f842b5f/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 to +to_s+.
-
#write(str) ⇒ Object
- +write+ must be called with a single argument that is a +String+.
Constructor Details
#initialize(error) ⇒ ErrorWrapper
Returns a new instance of ErrorWrapper.
582 583 584 |
# File 'vendor/bundler/ruby/3.4.0/bundler/gems/rack-40d68f842b5f/lib/rack/lint.rb', line 582 def initialize(error) @error = error end |
Instance Method Details
#close(*args) ⇒ Object
- +close+ must never be called on the error stream.
603 604 605 |
# File 'vendor/bundler/ruby/3.4.0/bundler/gems/rack-40d68f842b5f/lib/rack/lint.rb', line 603 def close(*args) raise LintError, "rack.errors#close must not be called" end |
#flush ⇒ Object
- +flush+ must be called without arguments and must be called in order to make the error appear for sure.
598 599 600 |
# File 'vendor/bundler/ruby/3.4.0/bundler/gems/rack-40d68f842b5f/lib/rack/lint.rb', line 598 def flush @error.flush end |
#puts(str) ⇒ Object
- +puts+ must be called with a single argument that responds to +to_s+.
587 588 589 |
# File 'vendor/bundler/ruby/3.4.0/bundler/gems/rack-40d68f842b5f/lib/rack/lint.rb', line 587 def puts(str) @error.puts str end |
#write(str) ⇒ Object
- +write+ must be called with a single argument that is a +String+.
592 593 594 595 |
# File 'vendor/bundler/ruby/3.4.0/bundler/gems/rack-40d68f842b5f/lib/rack/lint.rb', line 592 def write(str) raise LintError, "rack.errors#write not called with a String" unless str.kind_of? String @error.write str end |