mirror of
https://github.com/ruby/ruby.git
synced 2026-01-27 12:34:21 +00:00
21 lines
522 B
Ruby
21 lines
522 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Bundler
|
|
class FeatureFlag
|
|
(1..10).each {|v| define_method("bundler_#{v}_mode?") { @major_version >= v } }
|
|
|
|
def removed_major?(target_major_version)
|
|
@major_version > target_major_version
|
|
end
|
|
|
|
def deprecated_major?(target_major_version)
|
|
@major_version >= target_major_version
|
|
end
|
|
|
|
def initialize(bundler_version)
|
|
@bundler_version = Gem::Version.create(bundler_version)
|
|
@major_version = @bundler_version.segments.first
|
|
end
|
|
end
|
|
end
|