Class: R2OAS::Tool::Paths::Stats
- 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
-
#initialize(options = {}) ⇒ Stats
constructor
A new instance of Stats.
- #print ⇒ Object
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( = {}) super @paths_list = Dir.glob("#{schema_save_dir_path}/paths/**/**.yml") @path_from = Pathname(File.dirname(File.(root_dir_path))) @paths_stats = tool.paths_stats end |
Instance Method Details
#print ⇒ Object
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 |