Class: Paraduct::Configuration

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/paraduct/configuration.rb

Instance Method Summary collapse

Instance Method Details

#config_filePathname

Returns:

  • (Pathname)


38
39
40
# File 'lib/paraduct/configuration.rb', line 38

def config_file
  root_dir.join(".paraduct.yml")
end

#excludeObject



27
28
29
# File 'lib/paraduct/configuration.rb', line 27

def exclude
  config_data[:exclude] || []
end

#max_threadsInteger

Returns:

  • (Integer)


19
20
21
# File 'lib/paraduct/configuration.rb', line 19

def max_threads
  config_data[:max_threads] || 4
end

#root_dirPathname

Returns:

  • (Pathname)


43
44
45
# File 'lib/paraduct/configuration.rb', line 43

def root_dir
  Pathname.pwd
end

#rsync_optionObject



23
24
25
# File 'lib/paraduct/configuration.rb', line 23

def rsync_option
  config_data[:rsync_option] || {}
end

#scriptString+

Returns:

  • (String, Array<String>)


14
15
16
# File 'lib/paraduct/configuration.rb', line 14

def script
  config_data[:script]
end

#variablesPathname

Returns:

  • (Pathname)


9
10
11
# File 'lib/paraduct/configuration.rb', line 9

def variables
  config_data[:variables]
end

#work_dirPathname

Returns:

  • (Pathname)


32
33
34
35
# File 'lib/paraduct/configuration.rb', line 32

def work_dir
  _work_dir = config_data[:work_dir] || "tmp/paraduct_workspace"
  root_dir.join(_work_dir)
end