るりまサーチ

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

別のキーワード

  1. tracer set_get_line_procs
  2. webrick/httpservlet do_get
  3. net/http get
  4. http get
  5. ftp get

キーワード

検索結果

<< 1 2 3 ... > >>

GetoptLong#get -> [String, String] (21121.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 (18133.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 (18133.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 (18103.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 (18103.0)

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

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

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

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

@param remotefile 取...

絞り込み条件を変える

GetoptLong#get_option -> [String, String] (9121.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 (6150.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 (6150.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
//}...

Module#const_get(name, inherit = true) -> object (6132.0)

name で指定される名前の定数の値を取り出します。

..._get(:BAR) # => 1

class Baz
include Bar
end
# Object以外でも同様
p Baz.const_get(:BAR) # => 1
# 定義されていない定数
p Baz.const_get(:NOT_DEFINED) #=> raise NameError
# 第二引数に false を指定すると自分自身に定義された定数から探す
p Baz.const_get(...
...:BAR, false) #=> raise NameError
# 完全修飾名を指定すると include や自分自身へ定義されていない場合でも参照できる
p Class.const_get("Bar::BAR") # => 1
//}...

REXML::Attributes#get_attribute_ns(namespace, name) -> REXML::Attribute | nil (6132.0)

namespace と name で特定される属性を返します。

...>
</root>
EOS
a = doc.get_elements("/root/a").first

a.attributes.get_attribute_ns("", "att") # => att='&lt;'
a.attributes.get_attribute_ns("http://example.org/foo", "att") # => foo:att='1'
a.attributes.get_attribute_ns("http://example.org/baz", "att") # => nil
a.attributes.get_attribute_ns("http://...

絞り込み条件を変える

<< 1 2 3 ... > >>