Module: Pathway::Plugins::Authorization::InstanceMethods
- Defined in:
- lib/pathway/plugins/authorization.rb
Instance Method Summary collapse
Instance Method Details
#authorize(state, using: nil) ⇒ Object
11 12 13 |
# File 'lib/pathway/plugins/authorization.rb', line 11 def (state, using: nil) (state[using || result_key]).then { state } end |
#authorize_with(*objs) ⇒ Object
15 16 17 18 |
# File 'lib/pathway/plugins/authorization.rb', line 15 def (*objs) objs = objs.first if objs.size <= 1 (*objs) ? wrap(objs) : error(:forbidden) end |
#authorized?(*_) ⇒ Boolean
20 21 22 |
# File 'lib/pathway/plugins/authorization.rb', line 20 def (*_) true end |