module AuthorizeRbac::AuthorizeRbacMethods
Public Class Methods
extended(base)
click to toggle source
# File lib/authorize_rbac/authorize_rbac_methods.rb, line 3 def self.extended(base) class <<base @rbac = {} attr_reader :rbac end end
Public Instance Methods
access_list()
click to toggle source
# File lib/authorize_rbac/authorize_rbac_methods.rb, line 20 def access_list @rbac ||= {} end
method_added(method)
click to toggle source
# File lib/authorize_rbac/authorize_rbac_methods.rb, line 14 def method_added(method) return if private_method_defined? method access_list[method] = @roles @roles = nil end
roles(*roles)
click to toggle source
# File lib/authorize_rbac/authorize_rbac_methods.rb, line 10 def roles(*roles) @roles = roles end