module MongoidExtended
Constants
- VERSION
Public Class Methods
configure(*module_names)
click to toggle source
configure method is used for select extend modules @example Use soft delete module and object id module
MongoidExtended.configure(:SoftDelete, :ObjectId)
# File lib/mongoid_extended.rb, line 22 def configure *module_names module_names.each do |module_name| if const_defined?(module_name) klass = ::Object.const_get("MongoidExtended::#{module_name}") klass.configured unless klass.configured? else raise NameError, "uninitialized constant `#{module_name}` in MongoidExtended" end end end