るりまサーチ (Ruby 2.3.0)

最速Rubyリファレンスマニュアル検索!
4件ヒット [1-4件を表示] (0.014秒)
トップページ > クエリ:using[x] > バージョン:2.3.0[x] > 種類:特異メソッド[x]

別のキーワード

  1. _builtin using
  2. main using
  3. module using
  4. processcontroller using_at_exit_when_process_exit
  5. shell/process-controller using_at_exit_when_process_exit

ライブラリ

クラス

オブジェクト

キーワード

検索結果

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

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

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

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

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

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

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

"ABC".downcase # => "abc"...

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

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

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

主に POP before SMTP のために用意されています。


使用例:

require 'net/pop'

Net::POP3.auth_only('pop.example.com', nil, # using default port (110)
'YourAccount', 'YourPassword')

@param address POP3サーバのホスト名文字列
@param port 接続するPOP3サーバのポート番号
@param account ...

Proc.new -> Proc (22.0)

ブロックをコンテキストとともにオブジェクト化して返します。

ブロックをコンテキストとともにオブジェクト化して返します。

ブロックを指定しない場合、Ruby 2.7 では
$VERBOSE = true のときには警告メッセージ
「warning: Capturing the given block using Proc.new is deprecated; use `&block` instead」
が出力され、Ruby 3.0 では
ArgumentError (tried to create Proc object without a block)
が発生します。

ブロックを指定しなければ、このメソッドを呼び出したメソッドが
ブロックを伴うと...

Proc.new { ... } -> Proc (22.0)

ブロックをコンテキストとともにオブジェクト化して返します。

ブロックをコンテキストとともにオブジェクト化して返します。

ブロックを指定しない場合、Ruby 2.7 では
$VERBOSE = true のときには警告メッセージ
「warning: Capturing the given block using Proc.new is deprecated; use `&block` instead」
が出力され、Ruby 3.0 では
ArgumentError (tried to create Proc object without a block)
が発生します。

ブロックを指定しなければ、このメソッドを呼び出したメソッドが
ブロックを伴うと...