Module: Roles::Generic::User::Configuration

Instance Method Summary collapse

Instance Method Details

#configure(options = {}) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/roles_generic/generic/user/configuration.rb', line 3

def configure(options={})
  numericality = options[:num]
  type = options[:type]
  
  class_eval do
    include Roles::Generic::User
    include Roles::Generic::User::SingleRole if numericality == :single
    if type == :role_class
      include Roles::Generic::Role::InstanceMethods           
    end
    
    include self::Implementation
    
    alias_method :role_symbols, :roles
  end
  extend Roles::Generic::User::ClassMethods
  extend Roles::Generic::User::DefaultRoleKeys
end