Class: LibyearBundler::Reports::Console
- Defined in:
- lib/libyear_bundler/reports/console.rb
Overview
Responsible presenting data from the ‘::LibyearBundler::Models`. Should only be concerned with presentation, nothing else.
Constant Summary collapse
- FMT_LIBYEARS_COLUMN =
"%10.1f".freeze
- FMT_RELEASES_COLUMN =
"%10d".freeze
- FMT_VERSIONS_COLUMN =
"%15s".freeze
- FMT_SUMMARY_COLUMNS =
"%*s%15s%15s%15s%15s".freeze
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from LibyearBundler::Reports::Base
Instance Method Details
#write ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/libyear_bundler/reports/console.rb', line 13 def write gems = to_h[:gems] gem_name_width = gem_name_width(gems) gems.each { |gem| put_line_summary(gem, gem_name_width) } begin put_line_summary(@ruby, gem_name_width) if @ruby.outdated? rescue StandardError => e warn "Unable to calculate libyears for ruby itself: #{e} (line summary)" end put_summary(to_h) end |