251件ヒット
[1-100件を表示]
(0.131秒)
ライブラリ
-
net
/ telnet (8) - optparse (198)
- pathname (11)
-
shell
/ system-command (12) - socket (22)
クラス
- BasicSocket (22)
-
Net
:: Telnet (8) - OptionParser (198)
- Pathname (11)
-
Shell
:: SystemCommand (12)
キーワード
- cmd (4)
-
default
_ argv (11) - environment (11)
- help (11)
- login (4)
- notify (12)
- on (33)
- parse (22)
- parse! (11)
-
program
_ name (11) - recvmsg (11)
-
recvmsg
_ nonblock (11) - release (11)
- summarize (22)
-
summary
_ indent (11) -
to
_ a (11) -
to
_ s (11) - ver (11)
- write (11)
検索結果
先頭5件
- Pathname
# write(string , offset=nil , **opts) -> Integer - OptionParser
# summarize(to = [] , width = self . summary _ width , max = width - 1 , indent= self . summary _ indent) -> () - OptionParser
# summarize(to = [] , width = self . summary _ width , max = width - 1 , indent= self . summary _ indent) {|line| . . . } -> () - Net
:: Telnet # login(opts , password=nil) -> String - Net
:: Telnet # login(opts , password=nil) {|mesg| . . . } -> String
-
Pathname
# write(string , offset=nil , **opts) -> Integer (12408.0) -
...
IO.write(self.to_s, string, offset, **opts)と同じです。
@see IO.write... -
OptionParser
# summarize(to = [] , width = self . summary _ width , max = width - 1 , indent= self . summary _ indent) -> () (12261.0) -
サマリを指定された to へと加えていきます。
...m width サマリの幅を整数で指定します。
@param max サマリの最大幅を整数で指定します。
@param indent サマリのインデントを文字列で指定します。
//emlist[例][ruby]{
require "optparse"
opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")......opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end
opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
opts.summarize(["description\n"], 10, 8, " ")
# => ["description\n", " -i\n", " --init\n", " -u\n", " --update\n", " -h\n", " --help\... -
OptionParser
# summarize(to = [] , width = self . summary _ width , max = width - 1 , indent= self . summary _ indent) {|line| . . . } -> () (12261.0) -
サマリを指定された to へと加えていきます。
...m width サマリの幅を整数で指定します。
@param max サマリの最大幅を整数で指定します。
@param indent サマリのインデントを文字列で指定します。
//emlist[例][ruby]{
require "optparse"
opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")......opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end
opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
opts.summarize(["description\n"], 10, 8, " ")
# => ["description\n", " -i\n", " --init\n", " -u\n", " --update\n", " -h\n", " --help\... -
Net
:: Telnet # login(opts , password=nil) -> String (6421.0) -
指定したユーザ名とパスワードでログインします。
...
opts が文字列である場合は、 それをユーザ名、passwordをパスワードと
してログインします。
opts がハッシュである場合には、"Name" と "Password" をキーとする文字列を
ユーザ名、パスワードとしてログインします。
また、opts......がハッシュの場合には以下のオプションが利用できます。
"LoginPrompt" ログインプロンプトを正規表現で指定します。
デフォルト値は /[Ll]ogin[: ]*\z/n です。
"PasswordPrompt" パスワード入力プロンプトを正規表現で指定します。......た場合、ホストからの文字列を引数にブロックを逐次実行します。
例
# 1つめの引数が文字列の場合
telnet.login("your name", "your password")
# 1つめの引数がハッシュの場合
telnet.login("Name" => "your name", "Password" => "your password")... -
Net
:: Telnet # login(opts , password=nil) {|mesg| . . . } -> String (6421.0) -
指定したユーザ名とパスワードでログインします。
...
opts が文字列である場合は、 それをユーザ名、passwordをパスワードと
してログインします。
opts がハッシュである場合には、"Name" と "Password" をキーとする文字列を
ユーザ名、パスワードとしてログインします。
また、opts......がハッシュの場合には以下のオプションが利用できます。
"LoginPrompt" ログインプロンプトを正規表現で指定します。
デフォルト値は /[Ll]ogin[: ]*\z/n です。
"PasswordPrompt" パスワード入力プロンプトを正規表現で指定します。......た場合、ホストからの文字列を引数にブロックを逐次実行します。
例
# 1つめの引数が文字列の場合
telnet.login("your name", "your password")
# 1つめの引数がハッシュの場合
telnet.login("Name" => "your name", "Password" => "your password")... -
OptionParser
# summary _ indent -> String (6379.0) -
サマリを表示する時のインデントを文字列で返します。
.../emlist[例][ruby]{
require "optparse"
opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end
opts.summary_indent # => " "
opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
opts.sum......mary_indent = " "
opts.summary_indent # => " "
opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
//}... -
Shell
:: SystemCommand # notify(*opts) -> String (6309.0) -
@todo
...@todo
@param opts
@see Shell#notify... -
Shell
:: SystemCommand # notify(*opts) {|message| . . . } -> String (6309.0) -
@todo
...@todo
@param opts
@see Shell#notify... -
OptionParser
# environment(env) -> [String] (6219.0) -
環境変数 env に対して Shellwords.#shellwords を呼 んで配列にしてから parse を行ないます。
...ise OptionParser::ParseError パースに失敗した場合、発生します。
実際は OptionParser::ParseError のサブク
ラスになります。
//emlist[例][ruby]{
require "optparse"
config = {}
opts = OptionParser.new
opts.......on("-r", "--require LIBRARY"){|lib| config[:lib] = lib }
# HOGE_OPT は hoge というプログラム名に対応した名前です
ENV['HOGE_OPT'] = %q{--require lib1 'remain data'}
p opts.environment('HOGE_OPT') # => ["remain data"]
p config # => {:lib=>"lib1"}
//}... -
BasicSocket
# recvmsg(maxmesglen=nil , flags=0 , maxcontrollen=nil , opts={}) -> [String , Addrinfo , Integer , *Socket :: AncillaryData] (3614.0) -
recvmsg(2) を用いてメッセージを受け取ります。
...ックします。ノンブロッキング方式で通信したい
場合は BasicSocket#recvmsg_nonblock を用います。
maxmesglen, maxcontrollen で受け取るメッセージおよび補助データ
(Socket::AncillaryData)の最大長をバイト単位で指定します。
省略した場合......という名前の定数の biwsise OR を取った
ものを渡します。
opts にはその他のオプションを渡します。今のところ :scm_right => bool
というオプションのみ利用できます。このオプションに
真を渡すと、 SCM_RIGHTS 制御メッセージを......れる
IO オブジェクトを生成します。詳しくは Socket::AncillaryData#unix_rights
を参照してください。
返り値は配列で得られます。
返り値の配列の最初の要素は受け取ったメッセージを表す文字列です。
2番目の要素は connection-le... -
BasicSocket
# recvmsg _ nonblock(maxmesglen=nil , flags=0 , maxcontrollen=nil , opts={}) -> [String , Addrinfo , Integer , *Socket :: AncillaryData] (3608.0) -
recvmsg(2) を用いてノンブロッキング方式でメッセージを受け取ります。
...ングの有無以外は BasicSocket#recvmsg と同じです。
詳しくはそちらを参照してください。
@param maxmesglen 受け取るメッセージの最大長
@param flags フラグ
@param maxcontrollen 受け取る補助データの最大長
@param opts ハッシュオプション... -
OptionParser
# parse!(argv = self . default _ argv , into: nil) -> [String] (3361.0) -
与えられた argv をパースします。
...。
OptionParser#permute! と同様に argv を破壊的にパースします。
環境変数に POSIXLY_CORRECT が設定されている場合は、
OptionParser#order! と同様に振舞います。
@param argv パースしたい引数を文字列の配列で指定します。
@param into オ......ションを格納するハッシュを指定します。
指定したハッシュにはオプションの名前をキーとして、OptionParser#onに渡されたブロックの値が格納されます。
キーの名前はロングオプションが定義されていれば......ise OptionParser::ParseError パースに失敗した場合、発生します。
実際は OptionParser::ParseError のサブク
ラスになります。
//emlist[例][ruby]{
require "optparse"
opts = OptionParser.new do |opts|
opts...