module ActiveSupport::Configurable

def config

user.config.level # => 1
user.config.allowed_access # => true

user.config.level = 1
user.config.allowed_access = true

user = User.new

end
include ActiveSupport::Configurable
class User

require "active_support/configurable"

Reads and writes attributes from a configuration OrderedOptions.
def config
  @_config ||= self.class.config.inheritable_copy
end