Class: CanTango::Ability::Scope
- Inherits:
-
Object
- Object
- CanTango::Ability::Scope
- Defined in:
- lib/cantango/ability/scope.rb
Instance Attribute Summary collapse
-
#ability ⇒ Object
Returns the value of attribute ability.
Instance Method Summary collapse
- #can?(*args) ⇒ Boolean
- #cannot?(*args) ⇒ Boolean
-
#initialize(ability) ⇒ Scope
constructor
A new instance of Scope.
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
#ability ⇒ Object
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
10 11 12 |
# File 'lib/cantango/ability/scope.rb', line 10 def can? *args ability.can? *args end |
#cannot?(*args) ⇒ Boolean
14 15 16 |
# File 'lib/cantango/ability/scope.rb', line 14 def cannot? *args ability.cannot? *args end |