38件ヒット
[1-38件を表示]
(0.037秒)
別のキーワード
種類
- インスタンスメソッド (22)
- 文書 (16)
ライブラリ
- optparse (22)
クラス
- OptionParser (22)
キーワード
-
NEWS for Ruby 2
. 7 . 0 (5) -
default
_ argv= (11) -
ruby 1
. 8 . 4 feature (11)
検索結果
先頭5件
-
NEWS for Ruby 2
. 7 . 0 (26078.0) -
NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...NEWS for Ruby 2.7.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス......りました。 16256
//emlist[test.rb][ruby]{
require "optparse"
OptionParser.new do |opts|
opts.on("-f", "--foo", "foo") {|v| }
opts.on("-b", "--bar", "bar") {|v| }
opts.on("-c", "--baz", "baz") {|v| }
end.parse!
//}
//emlist{
$ ruby test.rb --baa
Traceback (most recent call last):
test.rb......= 標準添付ライブラリの互換性 (機能追加とバグ修正を除く)
* 以下のライブラリが新たにdefault gemsになりました。
* 以下のdefault gemがrubygems.orgで公開されました。
* benchmark
* cgi
* delegate
* getoptlong
* n... -
ruby 1
. 8 . 4 feature (23192.0) -
ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。
...ruby]: ruby インタプリタの変更
# * [api]: 拡張ライブラリ API
# * [lib]: ライブラリ
* レベル
* [bug]: バグ修正
* [new]: 追加されたクラス/メソッドなど
* [compat]: 変更されたクラス/メソッドなど
* 互換性のある変更
* on......command table and manipulate other IPs (for reason of security).
# Now, a IP object can be controlled by only its master IP or the
# default IP.
#
# * ext/tk/lib/remote-tk.rb: add restriction to manipulate.
#
# * ext/tk/tcltklib.c (ip_is_slave_of_p): add TclTkIp#slave_o......require "optparse"
puts "[#{ARGV * ', '}]"
ARGV.options do |opt|
opt.on("-n NODE") {|v| puts v }
opt.parse!
end
>ruby -v -Ku a.rb -n 時間
ruby 1.8.2 (2004-12-25) [i386-mswin32]
[-n, 時間]
時
>ruby -v... -
OptionParser
# parse!(argv = self . default _ argv) -> [String] (18207.0) -
与えられた argv をパースします。
...e"
opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end
ARGV # => ["-i", "-u", "-h", "test"]
opts.parse(ARGV) # => ["test"]
ARGV # => ["-i", "-u", "-h", "test"]
opts.parse!(ARGV) # => ["test"]
ARG... -
OptionParser
# parse!(argv = self . default _ argv , into: nil) -> [String] (18207.0) -
与えられた argv をパースします。
...e"
opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end
ARGV # => ["-i", "-u", "-h", "test"]
opts.parse(ARGV) # => ["test"]
ARGV # => ["-i", "-u", "-h", "test"]
opts.parse!(ARGV) # => ["test"]
ARG... -
OptionParser
# default _ argv=(argv) (6137.0) -
自身がデフォルトでパースする引数を文字列の配列で指定します。
...new
opts.on("-r", "--require LIBRARY"){|lib| config[:lib] = lib }
# パラメーター指定なしで実行
opts.default_argv # => []
opts.parse!
p config # => {}
opts.default_argv = ["--require", "lib1"] # => ["--require", "lib"]
opts.default_argv # => ["--require", "param1"]
opts.parse!...