Class: Omnizip::Commands::ProfileShowCommand
- Inherits:
-
Object
- Object
- Omnizip::Commands::ProfileShowCommand
- Defined in:
- lib/omnizip/commands/profile_show_command.rb
Overview
Command to show details of a specific compression profile
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ ProfileShowCommand
constructor
A new instance of ProfileShowCommand.
- #run(profile_name) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ ProfileShowCommand
Returns a new instance of ProfileShowCommand.
7 8 9 |
# File 'lib/omnizip/commands/profile_show_command.rb', line 7 def initialize( = {}) @options = end |
Instance Method Details
#run(profile_name) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/omnizip/commands/profile_show_command.rb', line 11 def run(profile_name) profile_sym = profile_name.to_sym profile = Omnizip::Profile.get(profile_sym) unless profile warn "Profile '#{profile_name}' not found" warn "" warn "Available profiles:" Omnizip::Profile.list.each { |name| warn " - #{name}" } exit 1 end display_profile(profile) end |