Class: EbsPruneSnapshot::Rotation

Inherits:
Object
  • Object
show all
Defined in:
lib/ebs_prune_snapshot.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dailyObject (readonly)

Returns the value of attribute daily.



235
236
237
# File 'lib/ebs_prune_snapshot.rb', line 235

def daily
  @daily
end

#monthlyObject (readonly)

Returns the value of attribute monthly.



235
236
237
# File 'lib/ebs_prune_snapshot.rb', line 235

def monthly
  @monthly
end

#weeklyObject (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_sObject



243
244
245
# File 'lib/ebs_prune_snapshot.rb', line 243

def to_s
  "Rotation: Daily #{daily}, Weekly #{weekly}, Monthly #{monthly}"
end