class Stackify::AuthWorker

Public Class Methods

new(name = 'Authorisation worker') click to toggle source
Calls superclass method
# File lib/stackify/workers/auth_worker.rb, line 4
def initialize name = 'Authorisation worker'
  super
  @type = :auth
end

Public Instance Methods

after_perform(result) click to toggle source
# File lib/stackify/workers/auth_worker.rb, line 9
def after_perform result
  if result.try(:status) == 200
    Stackify.send :authorized!
    Stackify.successfull_authorisation result
  else
    Stackify.unsuccessfull_authorisation result, self
  end
end