Class: FluentCommandBuilder::SevenZip::V920::Delete

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, files) ⇒ Delete

Returns a new instance of Delete.



154
155
156
157
# File 'lib/fluent_command_builder/command_builders/sevenzip_920.rb', line 154

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

Instance Method Details

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

Yields:

  • (@b)


192
193
194
195
196
197
198
# File 'lib/fluent_command_builder/command_builders/sevenzip_920.rb', line 192

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)


158
159
160
161
162
163
164
# File 'lib/fluent_command_builder/command_builders/sevenzip_920.rb', line 158

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)


170
171
172
173
174
# File 'lib/fluent_command_builder/command_builders/sevenzip_920.rb', line 170

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

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

Yields:

  • (@b)


175
176
177
178
179
180
# File 'lib/fluent_command_builder/command_builders/sevenzip_920.rb', line 175

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)


165
166
167
168
169
# File 'lib/fluent_command_builder/command_builders/sevenzip_920.rb', line 165

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

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

Yields:

  • (@b)


181
182
183
184
185
# File 'lib/fluent_command_builder/command_builders/sevenzip_920.rb', line 181

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)


186
187
188
189
190
191
# File 'lib/fluent_command_builder/command_builders/sevenzip_920.rb', line 186

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