Module: Tobox::Plugins::Stats::ConfigurationMethods
- Defined in:
- lib/tobox/plugins/stats.rb
Instance Attribute Summary collapse
-
#stats_interval_seconds ⇒ Object
readonly
Returns the value of attribute stats_interval_seconds.
Instance Method Summary collapse
Instance Attribute Details
#stats_interval_seconds ⇒ Object (readonly)
Returns the value of attribute stats_interval_seconds.
7 8 9 |
# File 'lib/tobox/plugins/stats.rb', line 7 def stats_interval_seconds @stats_interval_seconds end |
Instance Method Details
#on_stats(stats_interval_seconds, &callback) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/tobox/plugins/stats.rb', line 9 def on_stats(stats_interval_seconds, &callback) @stats_interval_seconds = stats_interval_seconds (@lifecycle_events[:stats] ||= []) << callback self end |