Class: BackupFlag

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cluster, file) ⇒ BackupFlag

Returns a new instance of BackupFlag.



175
176
177
178
179
180
# File 'lib/cassandra.rb', line 175

def initialize(cluster, file)
  @cluster = cluster
  @file = file.dup
  date_as_string = file.sub! 'BACKUP_COMPLETED_', ''
  @date = DateTime.strptime(date_as_string, '%Y_%m_%d')
end

Instance Attribute Details

#clusterObject (readonly)

Returns the value of attribute cluster.



173
174
175
# File 'lib/cassandra.rb', line 173

def cluster
  @cluster
end

#dateObject (readonly)

Returns the value of attribute date.



173
174
175
# File 'lib/cassandra.rb', line 173

def date
  @date
end

#fileObject (readonly)

Returns the value of attribute file.



173
174
175
# File 'lib/cassandra.rb', line 173

def file
  @file
end