Class: Merit::Configuration
- Inherits:
-
Object
- Object
- Merit::Configuration
- Defined in:
- lib/merit.rb
Instance Attribute Summary collapse
-
#checks_on_each_request ⇒ Object
Returns the value of attribute checks_on_each_request.
-
#current_user_method ⇒ Object
Returns the value of attribute current_user_method.
-
#observers ⇒ Object
Returns the value of attribute observers.
-
#orm ⇒ Object
Returns the value of attribute orm.
-
#user_model_name ⇒ Object
Returns the value of attribute user_model_name.
Instance Method Summary collapse
- #add_observer(class_name) ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
42 43 44 45 46 47 |
# File 'lib/merit.rb', line 42 def initialize @checks_on_each_request = true @orm = :active_record @user_model_name = 'User' @observers = [] end |
Instance Attribute Details
#checks_on_each_request ⇒ Object
Returns the value of attribute checks_on_each_request.
39 40 41 |
# File 'lib/merit.rb', line 39 def checks_on_each_request @checks_on_each_request end |
#current_user_method ⇒ Object
Returns the value of attribute current_user_method.
39 40 41 |
# File 'lib/merit.rb', line 39 def current_user_method @current_user_method end |
#observers ⇒ Object
Returns the value of attribute observers.
39 40 41 |
# File 'lib/merit.rb', line 39 def observers @observers end |
#orm ⇒ Object
Returns the value of attribute orm.
39 40 41 |
# File 'lib/merit.rb', line 39 def orm @orm end |
#user_model_name ⇒ Object
Returns the value of attribute user_model_name.
39 40 41 |
# File 'lib/merit.rb', line 39 def user_model_name @user_model_name end |
Instance Method Details
#add_observer(class_name) ⇒ Object
49 50 51 |
# File 'lib/merit.rb', line 49 def add_observer(class_name) @observers << class_name end |