Exception: AuthorizationHeaderParser::ParseError
- Inherits:
-
InvalidHeader
- Object
- StandardError
- InvalidHeader
- AuthorizationHeaderParser::ParseError
- Defined in:
- lib/authorization_header_parser.rb
Instance Method Summary collapse
-
#initialize(message, scanner) ⇒ ParseError
constructor
A new instance of ParseError.
Constructor Details
#initialize(message, scanner) ⇒ ParseError
Returns a new instance of ParseError.
10 11 12 13 14 15 16 |
# File 'lib/authorization_header_parser.rb', line 10 def initialize(, scanner) str = scanner.string from = [(scanner.pos - 5), 0].sort.pop upto = [(scanner.pos + 5), str.length].sort.shift piece = str[from..upto] super "#{} - at #{scanner.pos} (around #{piece.inspect})" end |