Class: R10K::Util::Cleaner

Inherits:
Object
  • Object
show all
Includes:
Logging, Purgeable
Defined in:
lib/r10k/util/cleaner.rb

Constant Summary

Constants included from Purgeable

Purgeable::FN_MATCH_OPTS, Purgeable::HIDDEN_FILE

Constants included from Logging

Logging::LOG_LEVELS, Logging::SYSLOG_LEVELS_MAP

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Purgeable

#current_contents, #logger, #matches?, #pending_contents, #potentially_purgeable, #purge!, #stale_contents

Methods included from Logging

add_outputters, debug_formatter, default_formatter, default_outputter, #logger, #logger_name, parse_level

Constructor Details

#initialize(managed_directories, desired_contents, purge_exclusions = []) ⇒ Cleaner

Returns a new instance of Cleaner.



13
14
15
16
17
# File 'lib/r10k/util/cleaner.rb', line 13

def initialize(managed_directories, desired_contents, purge_exclusions = [])
  @managed_directories = managed_directories
  @desired_contents    = desired_contents
  @purge_exclusions    = purge_exclusions
end

Instance Attribute Details

#desired_contentsObject (readonly)

Returns the value of attribute desired_contents.



11
12
13
# File 'lib/r10k/util/cleaner.rb', line 11

def desired_contents
  @desired_contents
end

#managed_directoriesObject (readonly)

Returns the value of attribute managed_directories.



11
12
13
# File 'lib/r10k/util/cleaner.rb', line 11

def managed_directories
  @managed_directories
end

#purge_exclusionsObject (readonly)

Returns the value of attribute purge_exclusions.



11
12
13
# File 'lib/r10k/util/cleaner.rb', line 11

def purge_exclusions
  @purge_exclusions
end