Class: Bundler::FeatureFlag
- Inherits:
-
Object
- Object
- Bundler::FeatureFlag
- Defined in:
- lib/bundler/feature_flag.rb
Instance Method Summary collapse
- #deprecated_major?(target_major_version) ⇒ Boolean
-
#initialize(bundler_version) ⇒ FeatureFlag
constructor
A new instance of FeatureFlag.
- #removed_major?(target_major_version) ⇒ Boolean
Constructor Details
#initialize(bundler_version) ⇒ FeatureFlag
Returns a new instance of FeatureFlag.
15 16 17 18 |
# File 'lib/bundler/feature_flag.rb', line 15 def initialize(bundler_version) @bundler_version = Gem::Version.create(bundler_version) @major_version = @bundler_version.segments.first end |
Instance Method Details
#deprecated_major?(target_major_version) ⇒ Boolean
11 12 13 |
# File 'lib/bundler/feature_flag.rb', line 11 def deprecated_major?(target_major_version) @major_version >= target_major_version end |
#removed_major?(target_major_version) ⇒ Boolean
7 8 9 |
# File 'lib/bundler/feature_flag.rb', line 7 def removed_major?(target_major_version) @major_version > target_major_version end |