mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
10 lines
215 B
Ruby
10 lines
215 B
Ruby
|
require 'optparse/date'
|
||
|
parser = OptionParser.new
|
||
|
parser.accept(:capitalize, /\w*/) do |value|
|
||
|
value.capitalize
|
||
|
end
|
||
|
parser.on('--capitalize XXX', :capitalize) do |value|
|
||
|
p [value, value.class]
|
||
|
end
|
||
|
parser.parse!
|