Module: RapidApi::Auth::Concerns::AuthenticatedController::ClassMethods

Defined in:
lib/rapid_api/auth/concerns/authenticated_controller.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#authenticate_procObject

Returns the value of attribute authenticate_proc.



24
25
26
# File 'lib/rapid_api/auth/concerns/authenticated_controller.rb', line 24

def authenticate_proc
  @authenticate_proc
end

Instance Method Details

#authenticate(&block) ⇒ Object



26
27
28
# File 'lib/rapid_api/auth/concerns/authenticated_controller.rb', line 26

def authenticate(&block)
  self.authenticate_proc = Proc.new { |request| block.call(request) }
end

#inherited(child) ⇒ Object



30
31
32
# File 'lib/rapid_api/auth/concerns/authenticated_controller.rb', line 30

def inherited(child)
  child.authenticate_proc = authenticate_proc
end