Class: Utils::ConfigFile::SyncDir

Inherits:
BlockConfig show all
Defined in:
lib/utils/config_file.rb

Overview

A configuration class for directory synchronization settings.

This class manages the configuration options related to synchronizing directories using rsync. It provides functionality to define patterns for skipping certain paths during synchronization operations, making it easy to exclude temporary, cache, or version control files from being synced.

Instance Method Summary collapse

Methods inherited from BlockConfig

config, inherited, #initialize, #to_ruby

Constructor Details

This class inherits a constructor from Utils::ConfigFile::BlockConfig

Instance Method Details

#skip?(path) ⇒ TrueClass, FalseClass

The skip? method determines whether a given path should be skipped based on the skip_path pattern.

This method checks if the provided path matches the internal skip_path regular expression, returning true if the path should be excluded from processing, or false otherwise.

pattern, false otherwise

Parameters:

  • path (String)

    the path to check against the skip pattern

Returns:

  • (TrueClass, FalseClass)

    true if the path matches the skip



808
809
810
# File 'lib/utils/config_file.rb', line 808

def skip?(path)
  path =~ skip_path
end