Class: Collavre::Configuration
- Inherits:
-
Object
- Object
- Collavre::Configuration
- Defined in:
- lib/collavre/configuration.rb
Instance Attribute Summary collapse
-
#current_user_method ⇒ Object
Returns the value of attribute current_user_method.
-
#user_class_name ⇒ Object
Returns the value of attribute user_class_name.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #user_class ⇒ Object
Constructor Details
#initialize ⇒ Configuration
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_method ⇒ Object
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_name ⇒ Object
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_class ⇒ Object
10 11 12 |
# File 'lib/collavre/configuration.rb', line 10 def user_class @user_class_name.constantize end |