Class: CanTango::Api::Ability::Scope
- Inherits:
-
Object
- Object
- CanTango::Api::Ability::Scope
- Includes:
- Dsl::Relationship
- Defined in:
- lib/cantango/api/ability/scope.rb
Instance Attribute Summary collapse
-
#ability ⇒ Object
readonly
Returns the value of attribute ability.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, ability) {|_self| ... } ⇒ Scope
constructor
A new instance of Scope.
Methods included from Dsl::Relationship
Constructor Details
#initialize(name, ability) {|_self| ... } ⇒ Scope
Returns a new instance of Scope.
7 8 9 10 11 |
# File 'lib/cantango/api/ability/scope.rb', line 7 def initialize name, ability, &block @name = name.to_sym @ability = ability yield self if block end |
Instance Attribute Details
#ability ⇒ Object (readonly)
Returns the value of attribute ability.
5 6 7 |
# File 'lib/cantango/api/ability/scope.rb', line 5 def ability @ability end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/cantango/api/ability/scope.rb', line 5 def name @name end |