class Bundler::FeatureFlag

def self.settings_flag(flag, &default)

def self.settings_flag(flag, &default)
  unless Bundler::Settings::BOOL_KEYS.include?(flag.to_s)
    raise "Cannot use `#{flag}` as a settings feature flag since it isn't a bool key"
  end
  settings_method("#{flag}?", flag, &default)
end

def self.settings_method(name, key, &default)

def self.settings_method(name, key, &default)
  define_method(name) do
    value = Bundler.settings[key]
    value = instance_eval(&default) if value.nil?
    value
  end
end

def self.settings_option(key, &default)

def self.settings_option(key, &default)
  settings_method(key, key, &default)
end

def initialize(bundler_version)

def initialize(bundler_version)
  @bundler_version = Gem::Version.create(bundler_version)
end

def major_version

def major_version
  @bundler_version.segments.first
end