るりまサーチ

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

別のキーワード

  1. _builtin at
  2. _builtin values_at
  3. time at
  4. dbm values_at
  5. csv values_at

検索結果

<< 1 2 3 ... > >>

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

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

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

header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という...
...さい。
dest を指定した場合には
ボディを少しずつ取得して順次
「dest << ボディの断片」を実行します。

@param path 取得するエンティティのパスを文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定し...
...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...

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

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

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

header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という...
...さい。
dest を指定した場合には
ボディを少しずつ取得して順次
「dest << ボディの断片」を実行します。

@param path 取得するエンティティのパスを文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定し...
...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...

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 取...

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

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

...o:att='1' bar:att='2' att='&lt;'/>
</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.att...
...ributes.get_attribute_ns("http://example.org/foo", "attt") # => nil
//}...

REXML::Attributes#get_attribute(name) -> Attribute | nil (15320.0)

name という名前の属性を取得します。

...Attributes#[]

//emlist[][ruby]{
require 'rexml/document'

doc = REXML::Document.new(<<-EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/bar">
<a foo:att='1' bar:att='2' att='&lt;'/>
</root>
EOS
a = doc.get_elements("/root/a").first

a.attributes.get_attribute("at...
...t") # => att='&lt;'
a.attributes.get_attribute("foo:att") # => foo:att='1'
//}...

絞り込み条件を変える

Gem::Commands::UnpackCommand#get_path(gemname, version_req) -> String | nil (12202.0)

引数で指定された条件にマッチする Gem パッケージを保存しているパスを返します。

引数で指定された条件にマッチする Gem パッケージを保存しているパスを返します。

@param gemname Gem パッケージの名前を指定します。

@param version_req バージョンの満たすべき条件を文字列で指定します。

Gem::RemoteFetcher#get_file_uri_path(uri) -> String (12202.0)

与えられた URI から "file://" を取り除いた文字列を返します。

与えられた URI から "file://" を取り除いた文字列を返します。

@param uri URI を表す文字列を指定します。

REXML::Attributes#each_attribute {|attribute| ... } -> () (9207.0)

各属性に対しブロックを呼び出します。

...は REXML::Attribute オブジェクトで渡されます。

//emlist[][ruby]{
require 'rexml/document'

doc = REXML::Document.new(<<EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/bar">
<a foo:att='1' bar:att='2' att='&lt;'/>
</root>
EOS
a = doc.get_elements("/r...
...oot/a").first

a.attributes.each_attribute do |attr|
p [attr.namespace, attr.name, attr.value]
end
# => ["http://example.org/foo", "att", "1"]
# => ["http://example.org/bar", "att", "2"]
# => ["", "att", "<"]
//}...

WEBrick::HTTPUtils::FormData#each_data {|s| ... } (9107.0)

自身が表す各フォームデータを引数として、与えられたブロックを実行します。

...ムデータを引数として、与えられたブロックを実行します。

例:

require "webrick/cgi"
class MyCGI < WEBrick::CGI
def do_GET(req, res)
req.query['q'].each_data{|s|
p s
}
#=> "val1"
"val2"
"val3"
end
end
MyCGI.new.start()...
<< 1 2 3 ... > >>