Class: FluentCommandBuilder::SevenZip::V920::Add

Inherits:
CommandBase
  • Object
show all
Defined in:
lib/fluent_command_builder/command_builders/sevenzip_920.rb

Instance Method Summary collapse

Methods inherited from CommandBase

#configure!, #execute!, #to_s

Constructor Details

#initialize(underlying_builder, archive, file_ref) ⇒ Add

Returns a new instance of Add.



53
54
55
56
# File 'lib/fluent_command_builder/command_builders/sevenzip_920.rb', line 53

def initialize(underlying_builder, archive, file_ref)
  super underlying_builder
  @b.append " a #{@b.format archive} #{@b.format file_ref}"
end

Instance Method Details

#compress_files_open_for_writing {|@b| ... } ⇒ Object

Yields:

  • (@b)


97
98
99
100
101
# File 'lib/fluent_command_builder/command_builders/sevenzip_920.rb', line 97

def compress_files_open_for_writing
  @b.append ' -ssw'
  yield @b if block_given?
  self
end

#create_sfx_archive(sfx_module = nil) {|@b| ... } ⇒ Object

Yields:

  • (@b)


80
81
82
83
84
85
# File 'lib/fluent_command_builder/command_builders/sevenzip_920.rb', line 80

def create_sfx_archive(sfx_module=nil)
  @b.append ' -sfx'
  @b.append "#{@b.format sfx_module}" unless sfx_module.nil?
  yield @b if block_given?
  self
end

#create_volumes(size, unit_of_measure = nil) {|@b| ... } ⇒ Object

Yields:

  • (@b)


112
113
114
115
116
117
# File 'lib/fluent_command_builder/command_builders/sevenzip_920.rb', line 112

def create_volumes(size, unit_of_measure=nil)
  @b.append " -v#{@b.format size}"
  @b.append "#{@b.format unit_of_measure}" unless unit_of_measure.nil?
  yield @b if block_given?
  self
end

#exclude(file_ref, recurse_type = nil) {|@b| ... } ⇒ Object

Yields:

  • (@b)


124
125
126
127
128
129
130
# File 'lib/fluent_command_builder/command_builders/sevenzip_920.rb', line 124

def exclude(file_ref, recurse_type=nil)
  @b.append ' -x'
  @b.append "#{@b.format recurse_type}" unless recurse_type.nil?
  @b.append "#{@b.format file_ref}"
  yield @b if block_given?
  self
end

#include(file_ref, recurse_type = nil) {|@b| ... } ⇒ Object

Yields:

  • (@b)


57
58
59
60
61
62
63
# File 'lib/fluent_command_builder/command_builders/sevenzip_920.rb', line 57

def include(file_ref, recurse_type=nil)
  @b.append ' -i'
  @b.append "#{@b.format recurse_type}" unless recurse_type.nil?
  @b.append "#{@b.format file_ref}"
  yield @b if block_given?
  self
end

#password(password) {|@b| ... } ⇒ Object

Yields:

  • (@b)


69
70
71
72
73
# File 'lib/fluent_command_builder/command_builders/sevenzip_920.rb', line 69

def password(password)
  @b.append " -p#{@b.format_password password}"
  yield @b if block_given?
  self
end

#read_data_from_stdin(file_name = nil) {|@b| ... } ⇒ Object

Yields:

  • (@b)


86
87
88
89
90
91
# File 'lib/fluent_command_builder/command_builders/sevenzip_920.rb', line 86

def read_data_from_stdin(file_name=nil)
  @b.append ' -si'
  @b.append "#{@b.format file_name}" unless file_name.nil?
  yield @b if block_given?
  self
end

#recursive(modifier = nil) {|@b| ... } ⇒ Object

Yields:

  • (@b)


74
75
76
77
78
79
# File 'lib/fluent_command_builder/command_builders/sevenzip_920.rb', line 74

def recursive(modifier=nil)
  @b.append ' -r'
  @b.append "#{@b.format modifier}" unless modifier.nil?
  yield @b if block_given?
  self
end

#set_compression_method(method_parameters) {|@b| ... } ⇒ Object

Yields:

  • (@b)


64
65
66
67
68
# File 'lib/fluent_command_builder/command_builders/sevenzip_920.rb', line 64

def set_compression_method(method_parameters)
  @b.append " -m#{@b.format method_parameters}"
  yield @b if block_given?
  self
end

#type(archive_type) {|@b| ... } ⇒ Object

Yields:

  • (@b)


102
103
104
105
106
# File 'lib/fluent_command_builder/command_builders/sevenzip_920.rb', line 102

def type(archive_type)
  @b.append " -t#{@b.format archive_type}"
  yield @b if block_given?
  self
end

#update_options(args) {|@b| ... } ⇒ Object

Yields:

  • (@b)


107
108
109
110
111
# File 'lib/fluent_command_builder/command_builders/sevenzip_920.rb', line 107

def update_options(args)
  @b.append " -u#{@b.format args}"
  yield @b if block_given?
  self
end

#working_dir(dir_path = nil) {|@b| ... } ⇒ Object

Yields:

  • (@b)


118
119
120
121
122
123
# File 'lib/fluent_command_builder/command_builders/sevenzip_920.rb', line 118

def working_dir(dir_path=nil)
  @b.append ' -w'
  @b.append "#{@b.format dir_path}" unless dir_path.nil?
  yield @b if block_given?
  self
end

#write_data_to_stdout {|@b| ... } ⇒ Object

Yields:

  • (@b)


92
93
94
95
96
# File 'lib/fluent_command_builder/command_builders/sevenzip_920.rb', line 92

def write_data_to_stdout
  @b.append ' -so'
  yield @b if block_given?
  self
end