Class: SingleFile

Inherits:
Source show all
Defined in:
lib/blanket/plugins/sources/single_file.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Utils

included, #method_missing, #noop

Constructor Details

#initialize(reader) ⇒ SingleFile

Returns a new instance of SingleFile.



3
4
5
# File 'lib/blanket/plugins/sources/single_file.rb', line 3

def initialize(reader)
  @reader = reader
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Utils

Class Method Details

.attribute_symbolsObject



7
8
9
# File 'lib/blanket/plugins/sources/single_file.rb', line 7

def self.attribute_symbols
  [:source_type, :host, :user, :password, :remote_path, :local_path ]
end

.default_hostObject



15
16
17
# File 'lib/blanket/plugins/sources/single_file.rb', line 15

def self.default_host
  "yourhost.com"
end

.default_local_pathObject



31
32
33
# File 'lib/blanket/plugins/sources/single_file.rb', line 31

def self.default_local_path
  "/path/to/local/blanket"
end

.default_passwordObject



23
24
25
# File 'lib/blanket/plugins/sources/single_file.rb', line 23

def self.default_password
  "password"
end

.default_remote_pathObject



27
28
29
# File 'lib/blanket/plugins/sources/single_file.rb', line 27

def self.default_remote_path
  "/path/to/remote/target/file"
end

.default_source_typeObject



11
12
13
# File 'lib/blanket/plugins/sources/single_file.rb', line 11

def self.default_source_type
  "Confluence"
end

.default_userObject



19
20
21
# File 'lib/blanket/plugins/sources/single_file.rb', line 19

def self.default_user
  "username"
end

Instance Method Details

#cleanup_commandObject



47
48
49
# File 'lib/blanket/plugins/sources/single_file.rb', line 47

def cleanup_command
  noop
end

#local_backup_pathObject



39
40
41
# File 'lib/blanket/plugins/sources/single_file.rb', line 39

def local_backup_path
  local_path
end

#prep_commandObject



43
44
45
# File 'lib/blanket/plugins/sources/single_file.rb', line 43

def prep_command
  noop
end

#remote_backup_pathObject



35
36
37
# File 'lib/blanket/plugins/sources/single_file.rb', line 35

def remote_backup_path
  remote_path
end