Class: Facepalm::Rails::Controller::OauthAccess::AccessFilter

Inherits:
Object
  • Object
show all
Defined in:
lib/facepalm/rails/controller/oauth_access.rb

Overview

A filter class for Rails

Instance Method Summary collapse

Constructor Details

#initialize(*permissions) ⇒ AccessFilter

Returns a new instance of AccessFilter.



15
16
17
# File 'lib/facepalm/rails/controller/oauth_access.rb', line 15

def initialize(*permissions)
  @permissions = permissions
end

Instance Method Details

#filter(controller) ⇒ Object



19
20
21
# File 'lib/facepalm/rails/controller/oauth_access.rb', line 19

def filter(controller)
  controller.send(:facepalm_require_authentication, *@permissions)
end