Class: Madeleine::NumberedFile

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

Overview

:nodoc:

Direct Known Subclasses

SnapshotFile

Instance Method Summary collapse

Constructor Details

#initialize(path, name, id) ⇒ NumberedFile

Returns a new instance of NumberedFile.



247
248
249
# File 'lib/madeleine.rb', line 247

def initialize(path, name, id)
  @path, @name, @id = path, name, id
end

Instance Method Details

#nameObject



251
252
253
254
255
256
257
# File 'lib/madeleine.rb', line 251

def name
  result = @path
  result += File::SEPARATOR
  result += sprintf("%0#{FILE_COUNTER_SIZE}d", @id)
  result += '.'
  result += @name
end