Class: Merit::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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_requestObject

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_methodObject

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

#observersObject

Returns the value of attribute observers.



39
40
41
# File 'lib/merit.rb', line 39

def observers
  @observers
end

#ormObject

Returns the value of attribute orm.



39
40
41
# File 'lib/merit.rb', line 39

def orm
  @orm
end

#user_model_nameObject

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