Module: Jets::Router::Route::Authorizer::ModuleMethods
- Defined in:
- lib/jets/router/route/authorizer.rb
Instance Method Summary collapse
Instance Method Details
#logical_id(authorizer, prefix_class: true) ⇒ Object
32 33 34 35 36 37 |
# File 'lib/jets/router/route/authorizer.rb', line 32 def logical_id(, prefix_class: true) klass, meth = .split("#") words = [meth, "authorizer"] words.unshift(klass) if prefix_class words.join('_').camelize # logical_id end |
#metadata(authorizer) ⇒ Object
39 40 41 42 43 44 45 |
# File 'lib/jets/router/route/authorizer.rb', line 39 def () klass = .split("#").first = "#{klass}_authorizer".camelize logical_id = logical_id(, prefix_class: false) # IE: MainAuthorizer.ProtectAuthorizer "#{}.#{logical_id}" end |