Module: TroleGroups::Api::Core

Defined in:
lib/trole_groups/api/core.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#rolegroupsTroles::Operations

Access to the Troles operations API

Returns:



5
6
7
# File 'lib/trole_groups/api/core.rb', line 5

def rolegroups
  @rolegroups ||= TroleGroups::Operations.new(self)
end

#rolegroups=(*new_rolegroups) ⇒ Object

Sets the roles of the subject (see #set_roles)



11
12
13
# File 'lib/trole_groups/api/core.rb', line 11

def rolegroups= *new_rolegroups
  rolegroups.set_rolegroups new_rolegroups
end

#static_roles?true, false

If this role subject instance should have static (immutable) roles

Returns:

  • (true, false)

    defaults to false so a role subject is allowed to change roles



17
18
19
# File 'lib/trole_groups/api/core.rb', line 17

def static_roles?
  false
end

#trolegroups_configObject



21
22
23
# File 'lib/trole_groups/api/core.rb', line 21

def trolegroups_config
  self.class.trolegroups_config      
end