Sha256: b432b44998b352b3aa129775d41a4956904345182e1ccecc5d7d0c7d24a22ec5
Contents?: true
Size: 1.06 KB
Versions: 66
Compression:
Stored size: 1.06 KB
Contents
#!/usr/bin/env ruby $:.unshift(File.dirname(__FILE__) + "/../../lib") require 'git-style-binary/command' GitStyleBinary.primary do version "0.0.1 (c) 2009 Nate Murray - local" opt :test_primary, "test an option on the primary", :type => String action do @categories = ["sports", "news"] end before_run do |cmd| puts "before_run command #{cmd}" end after_run do |cmd| puts "after_run command #{cmd}" end run do |command| puts "Primary Options: #{command.opts.inspect}" end end # OR # require 'git-style-binary/primary' # command = GitStyleBinary::primary("wordpress") do # version "#{$0} 0.0.1 (c) 2009 Nate Murray" # banner <<-EOS # usage: #{$0} #{all_options.collect(:&to_s).join(" ")} COMMAND [ARGS] # # The wordpress subcommands commands are: # {subcommand_names.pretty_print} # # See 'wordpress help COMMAND' for more information on a specific command. # EOS # opt :verbose, "verbose", :default => false # opt :dry, "dry run", :default => false # opt :test_global, "a basic global string option", :type => String # end
Version data entries
66 entries across 66 versions & 5 rubygems