module Mongoid::Config::Introspection

def options(include_deprecated: false)

Returns:
  • (Array) - ] the array of option objects

Parameters:
  • include_deprecated (true | false) -- Whether deprecated options
def options(include_deprecated: false)
  src = File.read(CONFIG_RB_PATH)
  src.scan(OPTION_PATTERN)
    .map { |opt| Option.from_captures(opt) }
    .reject { |opt| !include_deprecated && opt.deprecated? }
    .sort_by { |opt| opt.name }
end