Class: Lolita::Extensions::Authorization::Proxy
- Defined in:
- lib/lolita/extensions/authorization/proxy.rb
Instance Attribute Summary collapse
-
#adapter ⇒ Object
Returns the value of attribute adapter.
Instance Method Summary collapse
- #authorize!(*args) ⇒ Object
- #can?(*args) ⇒ Boolean
- #cannot?(*args) ⇒ Boolean
- #current_ability(*args) ⇒ Object
-
#initialize(context, options = {}) ⇒ Proxy
constructor
A new instance of Proxy.
Constructor Details
#initialize(context, options = {}) ⇒ Proxy
Returns a new instance of Proxy.
14 15 16 17 18 |
# File 'lib/lolita/extensions/authorization/proxy.rb', line 14 def initialize context,={} @context = context @options = @adapter = get_adapter() end |
Instance Attribute Details
#adapter ⇒ Object
Returns the value of attribute adapter.
12 13 14 |
# File 'lib/lolita/extensions/authorization/proxy.rb', line 12 def adapter @adapter end |
Instance Method Details
#authorize!(*args) ⇒ Object
28 29 30 |
# File 'lib/lolita/extensions/authorization/proxy.rb', line 28 def *args @adapter. *args end |
#can?(*args) ⇒ Boolean
20 21 22 |
# File 'lib/lolita/extensions/authorization/proxy.rb', line 20 def can? *args @adapter.can? *args end |
#cannot?(*args) ⇒ Boolean
24 25 26 |
# File 'lib/lolita/extensions/authorization/proxy.rb', line 24 def cannot? *args @adapter.cannot? *args end |
#current_ability(*args) ⇒ Object
32 33 34 |
# File 'lib/lolita/extensions/authorization/proxy.rb', line 32 def current_ability *args @adapter.current_ability *args end |