Class: Sanford::ErrorContext
- Inherits:
-
Object
- Object
- Sanford::ErrorContext
- Defined in:
- lib/sanford/error_handler.rb
Instance Attribute Summary collapse
-
#handler_class ⇒ Object
readonly
Returns the value of attribute handler_class.
-
#request ⇒ Object
readonly
Returns the value of attribute request.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#server_data ⇒ Object
readonly
Returns the value of attribute server_data.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(args) ⇒ ErrorContext
constructor
A new instance of ErrorContext.
Constructor Details
#initialize(args) ⇒ ErrorContext
Returns a new instance of ErrorContext.
78 79 80 81 82 83 |
# File 'lib/sanford/error_handler.rb', line 78 def initialize(args) @server_data = args[:server_data] @request = args[:request] @handler_class = args[:handler_class] @response = args[:response] end |
Instance Attribute Details
#handler_class ⇒ Object (readonly)
Returns the value of attribute handler_class.
76 77 78 |
# File 'lib/sanford/error_handler.rb', line 76 def handler_class @handler_class end |
#request ⇒ Object (readonly)
Returns the value of attribute request.
76 77 78 |
# File 'lib/sanford/error_handler.rb', line 76 def request @request end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
76 77 78 |
# File 'lib/sanford/error_handler.rb', line 76 def response @response end |
#server_data ⇒ Object (readonly)
Returns the value of attribute server_data.
75 76 77 |
# File 'lib/sanford/error_handler.rb', line 75 def server_data @server_data end |
Instance Method Details
#==(other) ⇒ Object
85 86 87 88 89 90 91 92 93 94 |
# File 'lib/sanford/error_handler.rb', line 85 def ==(other) if other.kind_of?(self.class) self.server_data == other.server_data && self.request == other.request && self.handler_class == other.handler_class && self.response == other.response else super end end |