Class: RsyncConfig::Module

Inherits:
Object
  • Object
show all
Includes:
Propertiable, UserManagement
Defined in:
lib/rsync_config/module.rb

Instance Method Summary collapse

Methods included from UserManagement

included, #load_secrets_file, #local_user_list, #local_users, #user?, #users, #users=, #write_secrets_file

Methods included from Propertiable

#[], #[]=, included, #properties_to_a, #sanitize_key

Constructor Details

#initialize(parent_config, name) ⇒ Module

Returns a new instance of Module.



17
18
19
20
# File 'lib/rsync_config/module.rb', line 17

def initialize(parent_config, name)
  @parent_config = parent_config
  @name = name
end

Instance Method Details

#to_config_fileObject



26
27
28
# File 'lib/rsync_config/module.rb', line 26

def to_config_file
  (["[#{@name}]"] + properties_to_a.map {|p| "    #{p}"}).join "\n"
end

#to_sObject



22
23
24
# File 'lib/rsync_config/module.rb', line 22

def to_s
  to_config_file
end