Class: R2OAS::Tool::Paths::Stats

Inherits:
Base
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/r2-oas/tool/paths/stats.rb

Constant Summary collapse

TIMESTAMPS =
['Created At', 'Updated At'].freeze
TABLE_TITLE =
'Paths Stats'

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Stats

Returns a new instance of Stats.



16
17
18
19
20
21
# File 'lib/r2-oas/tool/paths/stats.rb', line 16

def initialize(options = {})
  super
  @paths_list = Dir.glob("#{schema_save_dir_path}/paths/**/**.yml")
  @path_from = Pathname(File.dirname(File.expand_path(root_dir_path)))
  @paths_stats = tool.paths_stats
end

Instance Method Details



23
24
25
26
27
# File 'lib/r2-oas/tool/paths/stats.rb', line 23

def print
  table.title = Paint[TABLE_TITLE, table_title_color]
  puts table
  puts "\n#{Paint['Red', warning_color]}: over #{month_to_turn_to_warning_color} months since the last update."
end