Class: Bundler::Interactive::OutdatedGem
- Inherits:
-
Object
- Object
- Bundler::Interactive::OutdatedGem
- Defined in:
- lib/bundler/interactive/outdated_gem.rb
Constant Summary collapse
- VERSION_NAMES =
%w[MAJOR MINOR PATCH].freeze
Instance Method Summary collapse
- #active_version ⇒ Object
- #current_version ⇒ Object
-
#initialize(current_spec, active_spec, dependency) ⇒ OutdatedGem
constructor
A new instance of OutdatedGem.
- #label ⇒ Object
- #name(padding = 0) ⇒ Object
Constructor Details
#initialize(current_spec, active_spec, dependency) ⇒ OutdatedGem
Returns a new instance of OutdatedGem.
8 9 10 11 12 |
# File 'lib/bundler/interactive/outdated_gem.rb', line 8 def initialize(current_spec, active_spec, dependency) @current_spec = current_spec @active_spec = active_spec @dependency = dependency end |
Instance Method Details
#active_version ⇒ Object
22 23 24 |
# File 'lib/bundler/interactive/outdated_gem.rb', line 22 def active_version active_spec.version end |
#current_version ⇒ Object
18 19 20 |
# File 'lib/bundler/interactive/outdated_gem.rb', line 18 def current_version current_spec.version end |
#label ⇒ Object
26 27 28 29 30 31 |
# File 'lib/bundler/interactive/outdated_gem.rb', line 26 def label "#{version_label.ljust(10)} " \ "newest #{active_version.to_s.ljust(10)} " \ "installed #{current_version.to_s.ljust(10)} " \ "#{dependency_text.ljust(20)}" end |
#name(padding = 0) ⇒ Object
14 15 16 |
# File 'lib/bundler/interactive/outdated_gem.rb', line 14 def name(padding = 0) current_spec.name.ljust(padding) end |