るりまサーチ

最速Rubyリファレンスマニュアル検索!
3138件ヒット [1-100件を表示] (0.108秒)

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method gets
  4. irb/input-method new
  5. matrix -

キーワード

検索結果

<< 1 2 3 ... > >>

GetoptLong#get -> [String, String] (21237.0)

ARGV から、次のオプションの名前と、もしあればその引数の組を取 得します。メソッドは 2 つの値を返し、1 つ目の値がオプション名 (例: --max-size) で、2 つ目がオプションの引数 (例: 20K) です。

...組を取
得します。メソッドは 2 つの値を返し、1 つ目の値がオプション名
(例: --max-size) で、2 つ目がオプションの引数 (例: 20K) です。

get
get_option は常にオプション名を正式名
で返します。与えられたオプションが引数...
...わない場合は、エラーとなって、以下のいずれかの例外が発生し
ます。

* GetoptLong::AmbiguousOption
* GetoptLong::InvalidOption
* GetoptLong::MissingArgument
* GetoptLong::NeedlessArgument

加えて、静粛 (quiet) フラグが有効になっていない限り、...
...エラーメッ
セージを標準エラー出力に出力します。

例:
optname, optarg = option_parser.get...

Net::HTTP#get(path, header = nil, dest = nil) -> Net::HTTPResponse (18233.0)

サーバ上の path にあるエンティティを取得し、 Net::HTTPResponse のインスタンスとして返します。

...version 1.1
response, body = http.get( '/index.html' )

# net/http version 1.2
response = http.get('/index.html')

# compatible in both version
response , = http.get('/index.html')
response.body

# compatible, using block
File.open('save.txt', 'w') {|f|
http.get('/~foo/', nil) do |str|
f.writ...
...e str
end
}
//}

@see Net::HTTP#request_get...

Net::HTTP#get(path, header = nil, dest = nil) {|body_segment| .... } -> Net::HTTPResponse (18233.0)

サーバ上の path にあるエンティティを取得し、 Net::HTTPResponse のインスタンスとして返します。

...version 1.1
response, body = http.get( '/index.html' )

# net/http version 1.2
response = http.get('/index.html')

# compatible in both version
response , = http.get('/index.html')
response.body

# compatible, using block
File.open('save.txt', 'w') {|f|
http.get('/~foo/', nil) do |str|
f.writ...
...e str
end
}
//}

@see Net::HTTP#request_get...

Net::FTP#get(remotefile, localfile = File.basename(remotefile), blocksize = DEFAULT_BLOCKSIZE) -> nil (18203.0)

サーバ上のファイルを取得します。

...サーバ上のファイルを取得します。

Net::FTP#binary の値に従って
Net::FTP#getbinaryfile もしくは
Net::FTP#gettextfile を呼びだします。

binary が偽のとき、つまりテキストモードの
ときには blocksize は無視されます。

@param remotefile 取...

Net::FTP#get(remotefile, localfile = File.basename(remotefile), blocksize = DEFAULT_BLOCKSIZE) { |data| .... } -> nil (18203.0)

サーバ上のファイルを取得します。

...サーバ上のファイルを取得します。

Net::FTP#binary の値に従って
Net::FTP#getbinaryfile もしくは
Net::FTP#gettextfile を呼びだします。

binary が偽のとき、つまりテキストモードの
ときには blocksize は無視されます。

@param remotefile 取...

絞り込み条件を変える

GetoptLong#get_option -> [String, String] (9237.0)

ARGV から、次のオプションの名前と、もしあればその引数の組を取 得します。メソッドは 2 つの値を返し、1 つ目の値がオプション名 (例: --max-size) で、2 つ目がオプションの引数 (例: 20K) です。

...組を取
得します。メソッドは 2 つの値を返し、1 つ目の値がオプション名
(例: --max-size) で、2 つ目がオプションの引数 (例: 20K) です。

get
get_option は常にオプション名を正式名
で返します。与えられたオプションが引数...
...わない場合は、エラーとなって、以下のいずれかの例外が発生し
ます。

* GetoptLong::AmbiguousOption
* GetoptLong::InvalidOption
* GetoptLong::MissingArgument
* GetoptLong::NeedlessArgument

加えて、静粛 (quiet) フラグが有効になっていない限り、...
...エラーメッ
セージを標準エラー出力に出力します。

例:
optname, optarg = option_parser.get...

StringScanner#get_byte -> String | nil (6256.0)

1 バイトスキャンして文字列で返します。 スキャンポインタをその後ろに進めます。 スキャンポインタが文字列の末尾を指すなら nil を返します。

...Scanner#getbyte は将来のバージョンで削除される予定です。
代わりに StringScanner#get_byte を使ってください。

//emlist[例][ruby]{
require 'strscan'

utf8 = "\u{308B 3073 3044}"
s = StringScanner.new(utf8.encode("EUC-JP"))
p s.get_byte #=> "\xA4"
p s.get_byte...
...#=> "\xEB"
p s.get_byte #=> "\xA4"
p s.get_byte #=> "\xD3"
p s.get_byte #=> "\xA4"
p s.get_byte #=> "\xA4"
p s.get_byte #=> nil
//}...

StringScanner#getbyte -> String | nil (6256.0)

1 バイトスキャンして文字列で返します。 スキャンポインタをその後ろに進めます。 スキャンポインタが文字列の末尾を指すなら nil を返します。

...Scanner#getbyte は将来のバージョンで削除される予定です。
代わりに StringScanner#get_byte を使ってください。

//emlist[例][ruby]{
require 'strscan'

utf8 = "\u{308B 3073 3044}"
s = StringScanner.new(utf8.encode("EUC-JP"))
p s.get_byte #=> "\xA4"
p s.get_byte...
...#=> "\xEB"
p s.get_byte #=> "\xA4"
p s.get_byte #=> "\xD3"
p s.get_byte #=> "\xA4"
p s.get_byte #=> "\xA4"
p s.get_byte #=> nil
//}...

Net::HTTP#get2(path, header = nil) -> Net::HTTPResponse (6241.0)

サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。

...nse = http.request_get('/index.html')
p response['content-type']
puts response.body # body is already read

# using block
http.request_get('/index.html') {|response|
p response['content-type']
response.read_body do |str| # read body now
print str
end
}
//}

get
2 は時代遅れ...
...なので使わないでください。

@see Net::HTTP#get, Net::HTTPResponse#read_body...
<< 1 2 3 ... > >>