Class: FluentCommandBuilder::SevenZip::V920::Update

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) ⇒ Update

Returns a new instance of Update.



375
376
377
378
# File 'lib/fluent_command_builder/command_builders/sevenzip_920.rb', line 375

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

Instance Method Details

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

Yields:

  • (@b)


419
420
421
422
423
# File 'lib/fluent_command_builder/command_builders/sevenzip_920.rb', line 419

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)


402
403
404
405
406
407
# File 'lib/fluent_command_builder/command_builders/sevenzip_920.rb', line 402

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

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

Yields:

  • (@b)


440
441
442
443
444
445
446
# File 'lib/fluent_command_builder/command_builders/sevenzip_920.rb', line 440

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)


379
380
381
382
383
384
385
# File 'lib/fluent_command_builder/command_builders/sevenzip_920.rb', line 379

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)


391
392
393
394
395
# File 'lib/fluent_command_builder/command_builders/sevenzip_920.rb', line 391

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)


408
409
410
411
412
413
# File 'lib/fluent_command_builder/command_builders/sevenzip_920.rb', line 408

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)


396
397
398
399
400
401
# File 'lib/fluent_command_builder/command_builders/sevenzip_920.rb', line 396

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)


386
387
388
389
390
# File 'lib/fluent_command_builder/command_builders/sevenzip_920.rb', line 386

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)


424
425
426
427
428
# File 'lib/fluent_command_builder/command_builders/sevenzip_920.rb', line 424

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)


429
430
431
432
433
# File 'lib/fluent_command_builder/command_builders/sevenzip_920.rb', line 429

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)


434
435
436
437
438
439
# File 'lib/fluent_command_builder/command_builders/sevenzip_920.rb', line 434

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)


414
415
416
417
418
# File 'lib/fluent_command_builder/command_builders/sevenzip_920.rb', line 414

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