Class: Collavre::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/collavre/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



5
6
7
8
# File 'lib/collavre/configuration.rb', line 5

def initialize
  @user_class_name = "User"
  @current_user_method = -> { Current.user }
end

Instance Attribute Details

#current_user_methodObject

Returns the value of attribute current_user_method.



3
4
5
# File 'lib/collavre/configuration.rb', line 3

def current_user_method
  @current_user_method
end

#user_class_nameObject

Returns the value of attribute user_class_name.



3
4
5
# File 'lib/collavre/configuration.rb', line 3

def user_class_name
  @user_class_name
end

Instance Method Details

#user_classObject



10
11
12
# File 'lib/collavre/configuration.rb', line 10

def user_class
  @user_class_name.constantize
end