Class: RestMyCase::Context::Errors::Status

Inherits:
Base
  • Object
show all
Defined in:
lib/rest_my_case/context/errors/status.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from RestMyCase::Context::Errors::Base

Instance Attribute Details

#last_known_errorObject (readonly)

Returns the value of attribute last_known_error.



7
8
9
# File 'lib/rest_my_case/context/errors/status.rb', line 7

def last_known_error
  @last_known_error
end

Instance Method Details

#add(error) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/rest_my_case/context/errors/status.rb', line 9

def add(error)
  super

  @context.status.send("#{error[:status]}!")

  @last_known_error = error
end