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.
48 49 50 51 |
# File 'lib/bundler/feature_flag.rb', line 48 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
44 45 46 |
# File 'lib/bundler/feature_flag.rb', line 44 def deprecated_major?(target_major_version) @major_version >= target_major_version end |
#removed_major?(target_major_version) ⇒ Boolean
40 41 42 |
# File 'lib/bundler/feature_flag.rb', line 40 def removed_major?(target_major_version) @major_version > target_major_version end |