Module: LazyRotator

Defined in:
lib/lazy_rotator.rb,
lib/lazy_rotator/set.rb,
lib/lazy_rotator/version.rb,
lib/lazy_rotator/file/touch.rb,
lib/lazy_rotator/file/delete.rb,
lib/lazy_rotator/file/ignore.rb,
lib/lazy_rotator/file/rename.rb,
lib/lazy_rotator/file/undetermined.rb

Overview

Rotate a set of files

Defined Under Namespace

Modules: File Classes: Set

Constant Summary collapse

VERSION =
'0.3.0'

Class Method Summary collapse

Class Method Details

.rotate(file_name, retention_limit = 5) ⇒ Object



9
10
11
12
13
# File 'lib/lazy_rotator.rb', line 9

def self.rotate(file_name, retention_limit = 5)
  return unless ::File.exist? file_name

  Set.new(file_name, retention_limit).process
end