44件ヒット
[1-44件を表示]
(0.086秒)
別のキーワード
オブジェクト
- main (11)
キーワード
-
auth
_ only (11) - new (14)
-
used
_ modules (8)
検索結果
先頭5件
-
main
. using(module) -> self (18114.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
. used _ modules -> [Module] (29.0) -
現在のスコープで using されているすべてのモジュールを配列で返します。 配列内のモジュールの順番は未定義です。
...現在のスコープで using されているすべてのモジュールを配列で返します。
配列内のモジュールの順番は未定義です。
//emlist[例][ruby]{
module A
refine Object do
end
end
module B
refine Object do
end
end
using A
using B
p Module.used_modules
#=... -
Net
:: POP3 . auth _ only(address , port = nil , account , password , isapop=false) (7.0) -
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 接続す... -
Proc
. new -> Proc (7.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 (7.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)
が...