Class: BuildTool::Commands::Recipes::Info
- Defined in:
- lib/build-tool/commands/recipes/info.rb
Overview
BuildCommand
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Standard
#complete_module, #complete_modules, #initialize, #log_directory, #while_logging_to
Methods inherited from Base
#<=>, #applicable?, #cleanup_after_vcs_access, #complete, #complete_arguments, #complete_readline_1_8, #complete_readline_1_9, #configuration, #do_complete_1_8, #do_complete_1_9, #each_option, #execute, #fullname, #initialize, #log?, #say, #setup_command, #show_help, #skip_command, #summarize, #teardown_command, #usage
Methods included from HelpText
#cmdalias, #description, included, #long_description, #name
Constructor Details
This class inherits a constructor from BuildTool::Commands::Standard
Instance Method Details
#do_execute(args) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/build-tool/commands/recipes/info.rb', line 22 def do_execute( args ) if ( args.length != 1 ) return usage( args.length == 0 ? "Not enough arguments" : "To many arguments" ) end rec = Recipe.new( args[0] ) say "Description: #{rec.short_description}" say "Website: #{rec.website}" if rec.website say "Repository: #{rec.repository}" if rec.repository say "Browse Repository: #{rec.browse_repository}" if rec.browse_repository if rec.long_description say "Long Description:" for line in rec.long_description say " #{line.chomp}" end say "" end return 0 end |
#initialize_options ⇒ Object
17 18 19 20 |
# File 'lib/build-tool/commands/recipes/info.rb', line 17 def @options. = "Usage: #{Pathname.new($0).basename} #{self.fullname} RECIPE" super end |