Class: Dotsync::PullActionConfig

Inherits:
BaseConfig show all
Includes:
XDGBaseDirectory
Defined in:
lib/dotsync/config/pull_action_config.rb

Constant Summary

Constants included from PathUtils

Dotsync::PathUtils::ENV_VARS_COLOR

Instance Method Summary collapse

Methods included from XDGBaseDirectory

#xdg_bin_home, #xdg_cache_home, #xdg_config_home, #xdg_data_home

Methods inherited from BaseConfig

#initialize, #to_h

Methods included from PathUtils

#colorize_env_vars, #expand_env_vars, #extract_env_vars, #path_is_parent_or_same?, #relative_to_absolute, #sanitize_path, #translate_tmp_path

Constructor Details

This class inherits a constructor from Dotsync::BaseConfig

Instance Method Details

#backups_rootObject



12
13
14
# File 'lib/dotsync/config/pull_action_config.rb', line 12

def backups_root
  File.join(xdg_data_home, "dotsync", "backups")
end

#mappingsObject



7
8
9
10
# File 'lib/dotsync/config/pull_action_config.rb', line 7

def mappings
  mappings_list = section["mappings"]
  Array(mappings_list).map { |mapping| Dotsync::Mapping.new(mapping) }
end