Class: Cassia::ResponseHandlers::CloseNotify

Inherits:
Object
  • Object
show all
Defined in:
lib/cassia/response_handlers/close_notify.rb

Instance Method Summary collapse

Constructor Details

#initialize(access_controller, aps:) ⇒ CloseNotify

Returns a new instance of CloseNotify.



4
5
6
7
# File 'lib/cassia/response_handlers/close_notify.rb', line 4

def initialize(access_controller, aps: )
  @access_controller = access_controller
  @aps = aps
end

Instance Method Details

#handle(response) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/cassia/response_handlers/close_notify.rb', line 9

def handle(response)
  if response.success?
    handle_success
  else
    handle_failure(response)
  end
  response.success?
end