summaryrefslogtreecommitdiff
path: root/doc/optparse/ruby/required_argument.rb
diff options
context:
space:
mode:
Diffstat (limited to 'doc/optparse/ruby/required_argument.rb')
-rw-r--r--doc/optparse/ruby/required_argument.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/optparse/ruby/required_argument.rb b/doc/optparse/ruby/required_argument.rb
new file mode 100644
index 0000000000..228a492c3c
--- /dev/null
+++ b/doc/optparse/ruby/required_argument.rb
@@ -0,0 +1,9 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('-x XXX', '--xxx', 'Required argument via short name') do |value|
+ p ['--xxx', value]
+end
+parser.on('-y', '--y YYY', 'Required argument via long name') do |value|
+ p ['--yyy', value]
+end
+parser.parse!
2_0_0merge revision(s): 53153 and 23405@ruby_1_9_1usa10 years ruby_1_9_3merge revision(s) 48402:usa12 years ruby_1_9_2bump patchlevelhone12 years ruby_1_8_7merge revision(s) 44717:naruse12 years ruby_1_8* 2014-01-28svn12 years ruby_1_9_1* 2011-08-25svn15 years ruby_1_8_6* 2010-09-02svn16 years ruby_1_8_5merge revision(s) 17483:shyouhei18 years ruby_1_3set svn:eol-styleshyouhei19 years ruby_1_4set svn:eol-styleshyouhei19 years ruby_1_6set svn:eol-styleshyouhei19 years v1_0rset svn:eol-styleshyouhei19 years v1_1devset svn:eol-styleshyouhei19 years v1_1rset svn:eol-styleshyouhei19 years  TagDownloadAuthorAge v4.0.4commit b89eb1bcbf...Takashi Kokubun4 weeks v4.0.3commit 85ddef263a...Takashi Kokubun7 weeks v3_2_11commit 5483bfc1ae...Hiroshi SHIBATA2 months v3_3_11commit 1f2d15125a...Hiroshi SHIBATA2 months v4.0.2commit d3da9fec82...Takashi Kokubun3 months v3_4_9commit 76cca827ab...nagachika3 months v3_2_10commit a3a6d25788...Hiroshi SHIBATA5 months v4.0.1commit e04267a14b...Takashi Kokubun5 months v4.0.0commit 553f1675f3...NARUSE, Yui5 months v4.0.0-preview3commit cfa3e7cf75...Augustin Gottlieb6 months v3_4_8commit 995b59f666...Takashi Kokubun6 months v4.0.0-preview2commit 4fa6e9938c...NARUSE, Yui7 months v3_3_10commit 343ea05002...nagachika7 months v3_4_7commit 7a5688e2a2...Takashi Kokubun8 months v3_4_6commit dbd83256b1...Takashi Kokubun9 months v3_3_9commit f5c772fc7c...nagachika10 months v3_2_9commit 8f611e0c46...Hiroshi SHIBATA10 months v3_4_5commit 20cda200d3...Takashi Kokubun11 months v3_4_4commit a38531fd3f...Takashi Kokubun13 months v3_5_0_preview1commit d06ec25be4...Takashi Kokubun14 months v3_4_3commit d0b7e5b6a0...Takashi Kokubun14 months v3_3_8commit b200bad6cd...nagachika14 months v3_1_7commit 0a3704f218...Hiroshi SHIBATA14 months v3_2_8commit 13f495dc2c...Hiroshi SHIBATA14 months v3_4_2commit d2930f8e7a...Takashi Kokubun16 months v3_2_7commit 02ec315244...nagachika16 months v3_3_7commit be31f993d7...Takashi Kokubun17 months v3_4_1commit 48d4efcb85...NARUSE, Yui17 months v3_4_0commit f450108330...Takashi Kokubun17 months v3_4_0_rc1commit 29caae9991...Kevin Newton18 months v3_3_6commit 75015d4c1f...Takashi Kokubun19 months v3_2_6commit 63aeb018eb...nagachika19 months v3_4_0_preview2commit 32c733f57b...Misaki Shioi20 months v3_3_5commit ef084cc8f4...Takashi Kokubun21 months v3_2_5commit 31d0f1a2e7...nagachika22 months v3_3_4commit be1089c8ec...Takashi Kokubun23 months v3_3_3commit f1c7b6f435...Takashi Kokubun24 months v3_3_2commit e5a195edf6...Takashi Kokubun2 years v3_1_6commit a777087be6...Hiroshi SHIBATA2 years v3_4_0_preview1commit 9d69619623...Nobuyoshi Nakada2 years v3_0_7commit 724a071175...Hiroshi SHIBATA2 years v3_1_5commit 1945f8dc0e...Hiroshi SHIBATA2 years v3_3_1commit c56cd86388...NARUSE, Yui2 years v3_2_4commit af471c0e01...nagachika2 years v3_2_3commit 52bb2ac0a6...nagachika2 years v3_3_0commit 5124f9ac75...NARUSE, Yui2 years v3_3_0_rc1commit a49643340e...NARUSE, Yui2 years v3_3_0_preview3commit 60e19a0b5f...Nobuyoshi Nakada3 years v3_3_0_preview2commit e50fcca9a7...Nathan Froyd3 years v3_3_0_preview1commit a1b01e7701...Yuichiro Kaneko3 years v3_0_6commit 23a532679b...NAKAMURA Usaku3 years v2_7_8commit 1f4d455848...NAKAMURA Usaku3 years v3_2_2commit e51014f9c0...NARUSE, Yui3 years v3_1_4commit 957bb7cb81...Hiroshi SHIBATA3 years v3_2_1commit 31819e82c8...NARUSE, Yui3 years v3_2_0commit a528908271...NARUSE, Yui3 years v3_2_0_rc1commit 81e274c990...Lars Kanis4 years v2_7_7commit 168ec2b1e5...NAKAMURA Usaku4 years v3_0_5commit ba5cf0f7c5...Kazuki Yamaguchi4 years v3_1_3commit 1a6b16756e...nagachika4 years v3_2_0_preview3commit 28611be6ee...Hiroshi SHIBATA4 years v3_2_0_preview2commit 35cfc9a3bb...Kevin Newton4 years v2_6_10commit 7b4ea5bb73...usa4 years v3_0_4commit 3fa771dded...nagachika4 years v2_7_6commit c9c2245c0a...NAKAMURA Usaku4 years v3_1_2commit 4491bb740a...NARUSE, Yui4 years v3_2_0_preview1commit f801386f0c...Nobuyoshi Nakada4 years v3_1_1commit 53f5fc4236...NARUSE, Yui4 years v3_1_0commit fb4df44d16...NARUSE, Yui4 years v2_6_9commit 8e26731f9e...usa5 years v2_7_5commit f69aeb8314...NAKAMURA Usaku5 years v3_0_3commit 3fb7d2cadc...nagachika5 years v3_1_0_preview1commit 5a3b2e6141...Nobuyoshi Nakada5 years v2_7_4commit a21a3b7d23...Yusuke Endoh5 years v2_6_8commit 768423edc2...usa5 years v3_0_2commit 0db68f0233...nagachika5 years v2_7_3commit 6847ee089d...nagachika5 years v3_0_1commit 0fb782ee38...Nobuyoshi Nakada5 years v2_6_7commit 930143880a...usa5 years v2_5_9commit ee47403ce0...usa5 years v3_0_0commit 95aff21468...TAKANO Mitsuhiro5 years v3_0_0_rc2commit a89932799c...NARUSE, Yui5 years v3_0_0_rc1commit 8680ae9cbd...Nobuyoshi Nakada5 years v3_0_0_preview2commit d7a16670c3...Nobuyoshi Nakada5 years v2_7_2commit 5445e04352...nagachika6 years v3_0_0_preview1commit 0096d2b895...Koichi Sasada6 years v2_5_8commit 4992d9fd70...usa6 years v2_4_10commit 27f6ad737b...usa6 years v2_6_6commit 27958c2bd6...nagachika6 years v2_7_1commit a0c7c23c9c...NARUSE, Yui6 years v2_7_0commit 647ee6f091...aycabta6 years v2_7_0_rc2commit 75acbd5f00...Yusuke Endoh6 years v2_7_0_rc1commit 8a40dce0ff...git6 years v2_7_0_preview3commit b563439274...Nobuyoshi Nakada7 years v2_7_0_preview2commit 02aadf1032...Yusuke Endoh7 years v2_4_9commit 7c94ba3401...usa7 years v2_4_8commit 52f881b82a...usa7 years v2_5_7commit 1c39daae0f...usa7 years v2_6_5commit 37c2cd3fa4...nagachika7 years v2_6_4commit 6315e42c22...nagachika7 years v2_5_6commit 189a36cfab...usa7 years v2_4_7commit c914780585...usa7 years v1_0_971003commit 7ad198827b...Yukihiro Matsumoto7 years v1_0_971015commit 2a4ba10e2d...Yukihiro Matsumoto7 years v1_0_971021commit 9b01ce6954...Yukihiro Matsumoto7 years v1_0_971118commit cfd31fa21b...Yukihiro Matsumoto7 years v1_0_971125commit ab261638f5...Yukihiro Matsumoto7 years v1_0_971204commit fb0fe24512...Yukihiro Matsumoto7 years v1_0_971209commit 66541bbb36...Yukihiro Matsumoto7 years v1_0_971225commit 4207990990...Yukihiro Matsumoto7 years v0_71commit 4e65eab7ab...Yukihiro Matsumoto7 years v0_72commit 11e21a36bc...Yukihiro Matsumoto7 years v0_73commit b2420d8ffa...Yukihiro Matsumoto7 years v0_76commit 8bf1c909dc...Yukihiro Matsumoto7 years v0_95commit fca49a8a69...Yukihiro Matsumoto7 years v0_99_4_961224commit 554b989ba1...Yukihiro Matsumoto7 years v1_0_961225commit ce930d0429...Yukihiro Matsumoto7 years v1_0_971002commit 10d21745c8...Yukihiro Matsumoto7 years v0_62commit b3f9ba5a37...Yukihiro Matsumoto7 years v0_63commit bd0c733b77...Yukihiro Matsumoto7 years v0_64commit 5d828b25d4...Yukihiro Matsumoto7 years v0_65commit 897cf06695...Yukihiro Matsumoto7 years v0_66commit c080fb6d10...Yukihiro Matsumoto7 years v0_67commit 2f106ab85c...Yukihiro Matsumoto7 years v0_68commit 881c5a9c32...Yukihiro Matsumoto7 years v0_69commit d349889e77...Yukihiro Matsumoto7 years v0_50commit 6e30904136...Yukihiro Matsumoto7 years v0_51commit eed5c920dd...Yukihiro Matsumoto7 years v0_52commit 173976c97c...Yukihiro Matsumoto7 years v0_54commit 29f237a8b1...Yukihiro Matsumoto7 years v0_55commit c31025779d...Yukihiro Matsumoto7 years v0_56commit 4dfd93c72a...Yukihiro Matsumoto7 years v0_60commit 00e36aa09f...Yukihiro Matsumoto7 years v0_49commit 200e0ee2fd...Yukihiro Matsumoto7 years v2_7_0_preview1commit c55db6aa27...git7 years v2_6_3commit 257fda2518...naruse7 years v2_4_6commit 5b36edf4ca...usa7 years v2_5_5commit f11c0b253c...nagachika7 years v2_5_4commit 1a84920668...nagachika7 years v2_6_2commit 300089b723...naruse7 years v2_6_1commit e6d1c72bec...naruse7 years v2_6_0commit c1af7b1e1d...naruse7 years v2_6_0_rc2commit c54428bbd7...naruse7 years v2_6_0_rc1commit c7ee7e4205...naruse8 years v2_6_0_preview3commit 7ccad5680d...naruse8 years v2_5_3commit c4b6652223...nagachika8 years v2_4_5commit a0143aa5e4...usa8 years v2_3_8commit 8d23556886...usa8 years v2_5_2commit bf508be28b...nagachika8 years v2_6_0_preview2commit 6f59db30c1...naruse8 years v2_5_1commit 85883dc393...naruse8 years v2_3_7commit 9bfe7fc5cb...usa8 years v2_2_10commit 933bb2b8b5...usa8 years v2_4_4commit a8197e08f5...nagachika8 years v2_6_0_preview1commit ce0e3fc1b1...naruse8 years v2_5_0commit 4e0a512972...naruse8 years v2_3_6commit 2551734626...usa8 years v2_2_9