Class: Lolita::Extensions::Authorization::Proxy

Inherits:
Object
  • Object
show all
Defined in:
lib/lolita/extensions/authorization/proxy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(context, options = {}) ⇒ Proxy



13
14
15
16
17
# File 'lib/lolita/extensions/authorization/proxy.rb', line 13

def initialize context,options={}
  @context = context
  @options = options
  @adapter = get_adapter()
end

Instance Attribute Details

#adapterObject

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 authorize! *args
  @adapter.authorize! *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