Class: Deas::ErrorHandler::Context

Inherits:
Object
  • Object
show all
Defined in:
lib/deas/error_handler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Context

Returns a new instance of Context.



41
42
43
44
45
46
47
48
49
50
# File 'lib/deas/error_handler.rb', line 41

def initialize(args)
  @server_data   = args.fetch(:server_data)
  @request       = args.fetch(:request)
  @response      = args.fetch(:response)
  @route_path    = args.fetch(:route_path)
  @handler_class = args.fetch(:handler_class)
  @handler       = args.fetch(:handler)
  @params        = args.fetch(:params)
  @splat         = args.fetch(:splat)
end

Instance Attribute Details

#handlerObject (readonly)

Returns the value of attribute handler.



39
40
41
# File 'lib/deas/error_handler.rb', line 39

def handler
  @handler
end

#handler_classObject (readonly)

Returns the value of attribute handler_class.



39
40
41
# File 'lib/deas/error_handler.rb', line 39

def handler_class
  @handler_class
end

#paramsObject (readonly)

Returns the value of attribute params.



39
40
41
# File 'lib/deas/error_handler.rb', line 39

def params
  @params
end

#requestObject (readonly)

Returns the value of attribute request.



38
39
40
# File 'lib/deas/error_handler.rb', line 38

def request
  @request
end

#responseObject (readonly)

Returns the value of attribute response.



38
39
40
# File 'lib/deas/error_handler.rb', line 38

def response
  @response
end

#route_pathObject (readonly)

Returns the value of attribute route_path.



39
40
41
# File 'lib/deas/error_handler.rb', line 39

def route_path
  @route_path
end

#server_dataObject (readonly)

Returns the value of attribute server_data.



37
38
39
# File 'lib/deas/error_handler.rb', line 37

def server_data
  @server_data
end

#splatObject (readonly)

Returns the value of attribute splat.



39
40
41
# File 'lib/deas/error_handler.rb', line 39

def splat
  @splat
end

Instance Method Details

#==(other) ⇒ Object



52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/deas/error_handler.rb', line 52

def ==(other)
  if other.kind_of?(self.class)
    self.server_data   == other.server_data   &&
    self.handler_class == other.handler_class &&
    self.request       == other.request       &&
    self.response      == other.response      &&
    self.route_path    == other.route_path    &&
    self.handler       == other.handler       &&
    self.params        == other.params        &&
    self.splat         == other.splat
  else
    super
  end
end