module Apiphobic::Authorization::Resource::ClassMethods
Public Instance Methods
authorized_scope_root_class()
click to toggle source
# File lib/apiphobic/authorization/resource.rb, line 27 def authorized_scope_root_class @authorized_scope_root_class ||= Object.const_get(singular_resource_class_name) end
authorizer_class()
click to toggle source
# File lib/apiphobic/authorization/resource.rb, line 14 def authorizer_class @authorizer_class ||= Object.const_get(authorizer_class_name) end
authorizer_class_components(type = nil)
click to toggle source
# File lib/apiphobic/authorization/resource.rb, line 31 def authorizer_class_components(type = nil) [ name_components['root_module'], 'Authorizers', resource_name, type, ] .compact end
authorizer_class_name(type = nil)
click to toggle source
# File lib/apiphobic/authorization/resource.rb, line 41 def authorizer_class_name(type = nil) authorizer_class_components(type).join('::') end
authorizer_parameters_class()
click to toggle source
# File lib/apiphobic/authorization/resource.rb, line 18 def authorizer_parameters_class @authorizer_parameters_class ||= \ Object.const_get(authorizer_class_name('Parameters')) end
authorizer_scope_class()
click to toggle source
# File lib/apiphobic/authorization/resource.rb, line 23 def authorizer_scope_class @authorizer_scope_class ||= Object.const_get(authorizer_class_name('Scope')) end