Class: Shoes::UI::CLI::PackageCommand
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- Shoes::UI::CLI::PackageCommand
- Defined in:
- shoes-core/lib/shoes/ui/cli/package_command.rb
Instance Attribute Summary
Attributes inherited from BaseCommand
Instance Method Summary collapse
Methods inherited from BaseCommand
#help_from_options, #initialize, #parse!, #warn_on_unexpected_parameters
Constructor Details
This class inherits a constructor from Shoes::UI::CLI::BaseCommand
Instance Method Details
#help ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'shoes-core/lib/shoes/ui/cli/package_command.rb', line 23 def help ("shoes package [options] file", Shoes::Packager.new.) + <<-EOS Packages may be built either from a single .rb file, or a .yaml file with more options defined. EOS end |
#run ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'shoes-core/lib/shoes/ui/cli/package_command.rb', line 7 def run @packager = Shoes::Packager.new @packager.parse!(args) warn_on_unexpected_parameters(2) path = args[1] @packager.run(path) rescue OptionParser::InvalidOption => e puts "Whoops! #{e.}" puts puts help false end |