Class: RailsPulse::Stats::CleanupStatsReporter
- Inherits:
-
Object
- Object
- RailsPulse::Stats::CleanupStatsReporter
- Defined in:
- lib/rails_pulse/stats/cleanup_stats_reporter.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#output ⇒ Object
readonly
Returns the value of attribute output.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(output: $stdout) ⇒ CleanupStatsReporter
constructor
A new instance of CleanupStatsReporter.
- #report ⇒ Object
Constructor Details
#initialize(output: $stdout) ⇒ CleanupStatsReporter
Returns a new instance of CleanupStatsReporter.
10 11 12 13 |
# File 'lib/rails_pulse/stats/cleanup_stats_reporter.rb', line 10 def initialize(output: $stdout) @output = output @config = RailsPulse.configuration end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
4 5 6 |
# File 'lib/rails_pulse/stats/cleanup_stats_reporter.rb', line 4 def config @config end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
4 5 6 |
# File 'lib/rails_pulse/stats/cleanup_stats_reporter.rb', line 4 def output @output end |
Class Method Details
.report(output: $stdout) ⇒ Object
6 7 8 |
# File 'lib/rails_pulse/stats/cleanup_stats_reporter.rb', line 6 def self.report(output: $stdout) new(output: output).report end |
Instance Method Details
#report ⇒ Object
15 16 17 18 19 |
# File 'lib/rails_pulse/stats/cleanup_stats_reporter.rb', line 15 def report print_configuration print_table_sizes print_old_records_count if config.full_retention_period end |