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
13 14 15 16 17 |
# File 'lib/lolita/extensions/authorization/proxy.rb', line 13 def initialize context,={} @context = context = @adapter = get_adapter() end |
Instance Attribute Details
#adapter ⇒ Object
Returns the value of attribute adapter.
11 12 13 |
# File 'lib/lolita/extensions/authorization/proxy.rb', line 11 def adapter @adapter end |
Instance Method Details
#authorize!(*args) ⇒ Object
27 28 29 |
# File 'lib/lolita/extensions/authorization/proxy.rb', line 27 def *args @adapter. *args end |
#can?(*args) ⇒ Boolean
19 20 21 |
# File 'lib/lolita/extensions/authorization/proxy.rb', line 19 def can? *args @adapter.can? *args end |
#cannot?(*args) ⇒ Boolean
23 24 25 |
# File 'lib/lolita/extensions/authorization/proxy.rb', line 23 def cannot? *args @adapter.cannot? *args end |
#current_ability(*args) ⇒ Object
31 32 33 |
# File 'lib/lolita/extensions/authorization/proxy.rb', line 31 def current_ability *args @adapter.current_ability *args end |