Sha256: 7719803eca77c19e6fbddf922ab0dbc6e495f5578fbd7e05d14aa68a29145640
Contents?: true
Size: 554 Bytes
Versions: 3
Compression:
Stored size: 554 Bytes
Contents
require 'optparse' module Appload # This class handles argument parsing class Options attr_reader :options def initialize @options = {} parse_args end # Parsing arguments into hash form def parse_args raise 'Need to specify ipa path' unless ARGV[0] OptionParser.new do |opts| opts.banner = 'Usage: appload ipa' opts.on('-h', '--help', 'Display usage') do puts 'Usage: appload ipa' exit end @options[:ipa_path] = ARGV[0] end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
appload-0.1.2 | lib/appload/options.rb |
appload-0.1.1 | lib/appload/options.rb |
appload-0.1.0 | lib/appload/options.rb |