Module: Drillbit::AuthorizableResource::ClassMethods
- Defined in:
- lib/drillbit/authorizable_resource.rb
Instance Method Summary collapse
- #authorizer_class ⇒ Object
- #authorizer_filtering_params_class ⇒ Object
- #authorizer_prefix ⇒ Object
- #authorizer_resource_params_class ⇒ Object
- #authorizer_scope_class ⇒ Object
Instance Method Details
#authorizer_class ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/drillbit/authorizable_resource.rb', line 14 def @authorizer_class ||= "#{}" \ "Authorizers::" \ "#{resource_class_name}". constantize rescue NameError 'Drillbit::Authorizers::Query'.constantize end |
#authorizer_filtering_params_class ⇒ Object
43 44 45 46 47 48 49 50 51 |
# File 'lib/drillbit/authorizable_resource.rb', line 43 def @authorizer_filtering_params_class ||= "#{}" \ "Authorizers::" \ "#{resource_class_name}::" \ "FilteringParameters". constantize rescue NameError 'Drillbit::Authorizers::Parameters::Filtering'.constantize end |
#authorizer_prefix ⇒ Object
10 11 12 |
# File 'lib/drillbit/authorizable_resource.rb', line 10 def @authorizer_prefix ||= name[Resource::Naming::CONTROLLER_RESOURCE_NAME_PATTERN, 2] end |
#authorizer_resource_params_class ⇒ Object
33 34 35 36 37 38 39 40 41 |
# File 'lib/drillbit/authorizable_resource.rb', line 33 def @authorizer_resource_params_class ||= "#{}" \ "Authorizers::" \ "#{resource_class_name}" \ "::ResourceParameters". constantize rescue NameError 'Drillbit::Authorizers::Parameters::Resource'.constantize end |
#authorizer_scope_class ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'lib/drillbit/authorizable_resource.rb', line 23 def @authorizer_scope_class ||= "#{}" \ "Authorizers::" \ "#{resource_class_name}" \ "::Scope". constantize rescue NameError 'Drillbit::Authorizers::Scope'.constantize end |