Class: CanTango::Ability::Scope

Inherits:
Object
  • Object
show all
Defined in:
lib/cantango/ability/scope.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ability) ⇒ Scope

Returns a new instance of Scope.



6
7
8
# File 'lib/cantango/ability/scope.rb', line 6

def initialize ability
  @ability = ability
end

Instance Attribute Details

#abilityObject

Returns the value of attribute ability.



4
5
6
# File 'lib/cantango/ability/scope.rb', line 4

def ability
  @ability
end

Instance Method Details

#can?(*args) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/cantango/ability/scope.rb', line 10

def can? *args
  ability.can? *args
end

#cannot?(*args) ⇒ Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/cantango/ability/scope.rb', line 14

def cannot? *args
  ability.cannot? *args
end