Method: Command::Diff#short_number_option_parse
- Defined in:
- lib/command/diff.rb
#short_number_option_parse(argv) ⇒ Object
引数の中の -数字 オプション(-n 数字の省略形)を -n 数字 に変換する
70 71 72 73 74 75 76 77 78 |
# File 'lib/command/diff.rb', line 70 def short_number_option_parse(argv) argv.map! { |arg| if arg =~ /^-(\d+)$/ ["-n", $1.to_s] else arg end }.flatten! end |