Class: ServerBackups::MysqlIncrementalBackup::BinlogFilename

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ BinlogFilename

Returns a new instance of BinlogFilename.



13
14
15
# File 'lib/server_backups/mysql_incremental_backup.rb', line 13

def initialize(path)
    @path = path
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



12
13
14
# File 'lib/server_backups/mysql_incremental_backup.rb', line 12

def path
  @path
end

Instance Method Details

#log_indexObject



17
18
19
# File 'lib/server_backups/mysql_incremental_backup.rb', line 17

def log_index
    /(\d{6})/.match(File.basename(path)).captures.first
end