Class: SourceMonitor::Configuration::RetentionSettings
- Inherits:
-
Object
- Object
- SourceMonitor::Configuration::RetentionSettings
- Defined in:
- lib/source_monitor/configuration/retention_settings.rb
Instance Attribute Summary collapse
-
#items_retention_days ⇒ Object
Returns the value of attribute items_retention_days.
-
#max_items ⇒ Object
Returns the value of attribute max_items.
Instance Method Summary collapse
-
#initialize ⇒ RetentionSettings
constructor
A new instance of RetentionSettings.
- #strategy ⇒ Object
- #strategy=(value) ⇒ Object
Constructor Details
#initialize ⇒ RetentionSettings
Returns a new instance of RetentionSettings.
8 9 10 11 12 |
# File 'lib/source_monitor/configuration/retention_settings.rb', line 8 def initialize @items_retention_days = nil @max_items = nil @strategy = :destroy end |
Instance Attribute Details
#items_retention_days ⇒ Object
Returns the value of attribute items_retention_days.
6 7 8 |
# File 'lib/source_monitor/configuration/retention_settings.rb', line 6 def items_retention_days @items_retention_days end |
#max_items ⇒ Object
Returns the value of attribute max_items.
6 7 8 |
# File 'lib/source_monitor/configuration/retention_settings.rb', line 6 def max_items @max_items end |
Instance Method Details
#strategy ⇒ Object
14 15 16 |
# File 'lib/source_monitor/configuration/retention_settings.rb', line 14 def strategy @strategy end |
#strategy=(value) ⇒ Object
18 19 20 21 |
# File 'lib/source_monitor/configuration/retention_settings.rb', line 18 def strategy=(value) normalized = normalize_strategy(value) @strategy = normalized unless normalized.nil? end |