Class: EbsPruneSnapshot::Rotation
- Inherits:
-
Object
- Object
- EbsPruneSnapshot::Rotation
- Defined in:
- lib/ebs_prune_snapshot.rb
Instance Attribute Summary collapse
-
#daily ⇒ Object
readonly
Returns the value of attribute daily.
-
#monthly ⇒ Object
readonly
Returns the value of attribute monthly.
-
#weekly ⇒ Object
readonly
Returns the value of attribute weekly.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Rotation
constructor
A new instance of Rotation.
- #to_s ⇒ Object
Constructor Details
#initialize(args = {}) ⇒ Rotation
Returns a new instance of Rotation.
237 238 239 240 241 |
# File 'lib/ebs_prune_snapshot.rb', line 237 def initialize(args={}) @daily = args[:daily] ? args[:daily].to_i : 7 @weekly = args[:weekly] ? args[:weekly].to_i : 12 @monthly = args[:monthly] ? args[:monthly].to_i : 14 end |
Instance Attribute Details
#daily ⇒ Object (readonly)
Returns the value of attribute daily.
235 236 237 |
# File 'lib/ebs_prune_snapshot.rb', line 235 def daily @daily end |
#monthly ⇒ Object (readonly)
Returns the value of attribute monthly.
235 236 237 |
# File 'lib/ebs_prune_snapshot.rb', line 235 def monthly @monthly end |
#weekly ⇒ Object (readonly)
Returns the value of attribute weekly.
235 236 237 |
# File 'lib/ebs_prune_snapshot.rb', line 235 def weekly @weekly end |
Instance Method Details
#to_s ⇒ Object
243 244 245 |
# File 'lib/ebs_prune_snapshot.rb', line 243 def to_s "Rotation: Daily #{daily}, Weekly #{weekly}, Monthly #{monthly}" end |