module P4Util
Constants
- VERSION
Public Class Methods
parse_options(args)
click to toggle source
Returns the options as an OpenStruct object
# File lib/p4util.rb, line 14 def P4Util.parse_options(args) options = OpenStruct.new options.command = :help options.params = [] if args && !args.empty? options.command = args.first.to_sym if args.length > 1 options.params.concat(args.drop(1)) end end options end
run(args)
click to toggle source
# File lib/p4util.rb, line 8 def P4Util.run(args) options = parse_options(args) Commands.method(options.command).call(options) end