Sha256: 9cef8fbfa5a91e9a104185cf041ba58bbaa340a2a06b4029241774c9cd93cd14
Contents?: true
Size: 870 Bytes
Versions: 1
Compression:
Stored size: 870 Bytes
Contents
module Idonethis::UseCases class Options class << self def parse(argv={}) args = {} require 'optparse' OptionParser.new do |opts| opts.banner = "Usage: command [options]" opts.on("-v", "--verbose", "Run verbosely") do |v| args[:verbose] = v end opts.on("-m MESSAGE", "Message") do |m| args[:message] = m end opts.on("-d", "Dry run") do |_| args[:dry_run] = true end opts.on("-t TEAM", "--team TEAM" "Run against this team") do |team_name| args[:team] = team_name end opts.on("-s WHEN", "--since WHEN" "Show git commits since when") do |value| args[:since] = value end end.parse! args end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
idonethis-cli-0.14.2 | lib/idonethis/use_cases/options.rb |