module Restrict::Rails::Controller
Public Instance Methods
inherited(subclass)
click to toggle source
# File lib/restrict/rails/controller.rb, line 6 def inherited(subclass) subclass.extend Restrict::Rails::Controller end
restrictions()
click to toggle source
# File lib/restrict/rails/controller.rb, line 10 def restrictions inherited_restrictions + self.class.__send__(:restrict_restrictions) end
Private Instance Methods
inherited_restrictions()
click to toggle source
# File lib/restrict/rails/controller.rb, line 40 def inherited_restrictions self.class.ancestors.map do |ancestor| if ancestor.instance_variable_get(:@restrict_gatekeeper_installed) ancestor.__send__(:restrict_restrictions) end end.compact.flatten end
invoke_gatekeeper()
click to toggle source
# File lib/restrict/rails/controller.rb, line 48 def invoke_gatekeeper Restrict::Gatekeeper.new.eye(self) end