Class: Dependabot::Bundler::PackageManager
- Inherits:
-
PackageManagerBase
- Object
- PackageManagerBase
- Dependabot::Bundler::PackageManager
- Extended by:
- T::Sig
- Defined in:
- lib/dependabot/bundler/package_manager.rb
Instance Attribute Summary collapse
-
#deprecated_versions ⇒ Object
readonly
Returns the value of attribute deprecated_versions.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#supported_versions ⇒ Object
readonly
Returns the value of attribute supported_versions.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
- #deprecated? ⇒ Boolean
-
#initialize(version) ⇒ PackageManager
constructor
A new instance of PackageManager.
- #unsupported? ⇒ Boolean
Constructor Details
#initialize(version) ⇒ PackageManager
Returns a new instance of PackageManager.
24 25 26 27 28 29 |
# File 'lib/dependabot/bundler/package_manager.rb', line 24 def initialize(version) @version = T.let(Version.new(version), Dependabot::Version) @name = T.let(PACKAGE_MANAGER, String) @deprecated_versions = T.let(DEPRECATED_BUNDLER_VERSIONS, T::Array[Dependabot::Version]) @supported_versions = T.let(SUPPORTED_BUNDLER_VERSIONS, T::Array[Dependabot::Version]) end |
Instance Attribute Details
#deprecated_versions ⇒ Object (readonly)
Returns the value of attribute deprecated_versions.
38 39 40 |
# File 'lib/dependabot/bundler/package_manager.rb', line 38 def deprecated_versions @deprecated_versions end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
32 33 34 |
# File 'lib/dependabot/bundler/package_manager.rb', line 32 def name @name end |
#supported_versions ⇒ Object (readonly)
Returns the value of attribute supported_versions.
41 42 43 |
# File 'lib/dependabot/bundler/package_manager.rb', line 41 def supported_versions @supported_versions end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
35 36 37 |
# File 'lib/dependabot/bundler/package_manager.rb', line 35 def version @version end |
Instance Method Details
#deprecated? ⇒ Boolean
44 45 46 |
# File 'lib/dependabot/bundler/package_manager.rb', line 44 def deprecated? deprecated_versions.include?(version) end |
#unsupported? ⇒ Boolean
48 49 50 |
# File 'lib/dependabot/bundler/package_manager.rb', line 48 def unsupported? !deprecated? && version < supported_versions.first end |