Class: CanTango::Api::Ability::Scope

Inherits:
Object
  • Object
show all
Includes:
Dsl::Relationship
Defined in:
lib/cantango/api/ability/scope.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Dsl::Relationship

included

Constructor Details

#initialize(name, ability) {|_self| ... } ⇒ Scope

Returns a new instance of Scope.

Yields:

  • (_self)

Yield Parameters:


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

#abilityObject (readonly)

Returns the value of attribute ability


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

def ability
  @ability
end

#nameObject (readonly)

Returns the value of attribute name


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

def name
  @name
end