Class: Omnizip::Commands::ArchiveListCommand
- Inherits:
-
Object
- Object
- Omnizip::Commands::ArchiveListCommand
- Defined in:
- lib/omnizip/commands/archive_list_command.rb
Overview
Command to list contents of .7z archives.
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ ArchiveListCommand
constructor
Initialize archive list command with options.
-
#run(archive_file) ⇒ void
Execute the archive list command.
Constructor Details
#initialize(options = {}) ⇒ ArchiveListCommand
Initialize archive list command with options.
28 29 30 |
# File 'lib/omnizip/commands/archive_list_command.rb', line 28 def initialize( = {}) @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
23 24 25 |
# File 'lib/omnizip/commands/archive_list_command.rb', line 23 def @options end |
Instance Method Details
#run(archive_file) ⇒ void
This method returns an undefined value.
Execute the archive list command.
36 37 38 39 40 41 42 43 44 45 |
# File 'lib/omnizip/commands/archive_list_command.rb', line 36 def run(archive_file) validate_input(archive_file) verbose = [:verbose] || false patterns = Array([:pattern]) if [:pattern] excludes = Array([:exclude]) if [:exclude] count_only = [:count] || false list_archive(archive_file, verbose, patterns, excludes, count_only) end |