Class: Exceptional::RackExceptionData
- Inherits:
-
ExceptionData
- Object
- ExceptionData
- Exceptional::RackExceptionData
- Defined in:
- lib/exceptional/rack_exception_data.rb
Instance Method Summary collapse
- #extra_stuff ⇒ Object
- #framework ⇒ Object
-
#initialize(exception, environment, request) ⇒ RackExceptionData
constructor
A new instance of RackExceptionData.
Methods inherited from ExceptionData
#context_stuff, sanitize_hash, #to_hash, #to_json, #uniqueness_hash
Constructor Details
#initialize(exception, environment, request) ⇒ RackExceptionData
Returns a new instance of RackExceptionData.
5 6 7 8 9 |
# File 'lib/exceptional/rack_exception_data.rb', line 5 def initialize(exception, environment, request) super(exception) @environment = environment @request = request end |
Instance Method Details
#extra_stuff ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/exceptional/rack_exception_data.rb', line 15 def extra_stuff return {} if @request.nil? { 'request' => { 'url' => "#{@request.url}", 'parameters' => @request.params, 'request_method' => @request.request_method.to_s, 'remote_ip' => @request.ip, 'headers' => @environment.reject{|k,v| !k.match(/^HTTP_/)}, 'session' => @request.session } } end |
#framework ⇒ Object
11 12 13 |
# File 'lib/exceptional/rack_exception_data.rb', line 11 def framework "rack" end |