るりまサーチ

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

別のキーワード

  1. net/imap param
  2. win32ole win32ole_param
  3. win32ole_param new
  4. win32ole_param to_s
  5. win32ole_param name

ライブラリ

クラス

オブジェクト

キーワード

検索結果

<< 1 2 > >>

main.using(module) -> self (18119.0)

引数で指定したモジュールで定義された拡張を有効にします。

...ents_rdoc.html#label-Scope

@param module 有効にするモジュールを指定します。

//emlist[例][ruby]{
module Sloth
refine String do
def downcase
self
end
end
end

"ABC".downcase # => "abc"

using
Sloth

"ABC".downcase # => "ABC"
//}

@see Module#refine, Module#using...

Module#using(module) -> self (18113.0)

引数で指定したモジュールで定義された拡張を現在のクラス、モジュールで有 効にします。

...ルで有
効にします。

有効にした拡張の有効範囲については以下を参照してください。

* https://docs.ruby-lang.org/en/master/syntax/refinements_rdoc.html#label-Scope

@param module 有効にするモジュールを指定します。

@see Module#refine, main.using...

Net::POP3.auth_only(address, port = nil, account, password, isapop=false) (36.0)

POP セッションを開き、認証だけを行って接続を切ります。

...nil, # using default port (110)
'YourAccount', 'YourPassword')

@param address POP3サーバのホスト名文字列
@param port 接続するPOP3サーバのポート番号
@param account アカウント名文字列
@param password パスワード文字列
@param isapop...

Module#refine(klass) { ... } -> Module (30.0)

引数 klass で指定したクラスまたはモジュールだけに対して、ブロックで指定した機能を提供で きるモジュールを定義します。定義した機能は Module#refine を使用せずに直 接 klass に対して変更を行う場合と異なり、限られた範囲のみ有効にできます。 そのため、既存の機能を局所的に修正したい場合などに用いる事ができます。

...inement.html
* https://docs.ruby-lang.org/en/master/syntax/refinements_rdoc.html

定義した機能は main.using, Module#using を実行した場合のみ
有効になります。

@param klass 拡張する対象のクラスまたはモジュールを指定します。

@return ブロックで指...
...機能を持つ無名のモジュールを返します。

//emlist[例][ruby]{
class C
def foo
puts "C#foo"
end
end

module M
refine C do
def foo
puts "C#foo in M"
end
end
end

x = C.new
x.foo # => "C#foo"

using
M

x = C.new
x.foo # => "C#foo in M"
//}

@see main.using...

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

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

...順次
「dest << ボディの断片」を実行します。

@param path 取得するエンティティのパスを文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。
@param dest 利用しないでください。

1.1 互換モードの...
....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.write str
end
}
//}

@see Net::HTTP#request_get...

絞り込み条件を変える

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

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

...順次
「dest << ボディの断片」を実行します。

@param path 取得するエンティティのパスを文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。
@param dest 利用しないでください。

1.1 互換モードの...
....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.write str
end
}
//}

@see Net::HTTP#request_get...

Net::HTTP#post(path, data, header = nil, dest = nil) -> Net::HTTPResponse (24.0)

サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。

...取得して順次
「dest << ボディの断片」を実行します。

@param path POST先のパスを文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。
@param dest 利用しないでください。

1.1 互換モードの場合は...
...p.post('/cgi-bin/search.rb', 'query=subject&target=ruby')

# version 1.2
response = http.post('/cgi-bin/search.rb', 'query=subject&target=ruby')

# using block
File.open('save.html', 'w') {|f|
http.post('/cgi-bin/search.rb', 'query=subject&target=ruby') do |str|
f.write str
end
}
//}

@see N...

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

サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。

...取得して順次
「dest << ボディの断片」を実行します。

@param path POST先のパスを文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。
@param dest 利用しないでください。

1.1 互換モードの場合は...
...p.post('/cgi-bin/search.rb', 'query=subject&target=ruby')

# version 1.2
response = http.post('/cgi-bin/search.rb', 'query=subject&target=ruby')

# using block
File.open('save.html', 'w') {|f|
http.post('/cgi-bin/search.rb', 'query=subject&target=ruby') do |str|
f.write str
end
}
//}

@see N...

Net::HTTP#post2(path, data, header = nil) -> Net::HTTPResponse (24.0)

サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。 返り値は Net::HTTPResponse のインスタンスです。

...Content-Type として
"application/x-www-form-urlencoded" を用います。

@param path POST先のエンティティのパスを文字列で指定します。
@param data POSTするデータを与えます。
@param header リクエストの HTTP ヘッダをハッシュで指定します。

po...
...[ruby]{
response = http.request_post('/cgi-bin/nice.rb', 'datadatadata...')
p response.status
puts response.body # body is already read

# using block
http.request_post('/cgi-bin/nice.rb', 'datadatadata...') {|response|
p response.status
p response['content-type']
response.read_body d...
<< 1 2 > >>