59件ヒット
[1-59件を表示]
(0.109秒)
種類
- インスタンスメソッド (22)
- ライブラリ (11)
- 特異メソッド (11)
- 関数 (11)
- 文書 (4)
ライブラリ
- ビルトイン (11)
-
irb
/ extend-command (22)
クラス
- Module (11)
モジュール
キーワード
-
NEWS for Ruby 3
. 0 . 0 (4) -
install
_ alias _ method (11) -
irb
/ completion (11) -
irb
_ original _ method _ name (11) -
rb
_ mod _ alias _ method (11)
検索結果
先頭5件
-
irb
/ completion (26006.0) -
irb の completion 機能を提供するライブラリです。
...irb の completion 機能を提供するライブラリです。
=== 使い方
$ irb -r irb/completion
とするか, ~/.irbrc 中に
require "irb/completion"
を入れてください.
irb実行中に require "irb/completion" してもよいです.
irb 実行中に [Tab] を押すとコ......全に補完します.
irb(main):001:0> in
in inspect instance_eval
include install_alias_method instance_of?
initialize install_aliases instance_variables
irb(main):001:0> inspect
"main"
irb(main):002:0> foo = Objec......覧がでます.
irb(main):003:0> foo.
foo.== foo.frozen? foo.protected_methods
foo.=== foo.hash foo.public_methods
foo.=~ foo.id foo.respond_to?
foo.__id__ foo.inspect f... -
Module
# alias _ method(new , original) -> Symbol (24219.0) -
メソッドの別名を定義します。
...メソッドの別名を定義します。
//emlist[例][ruby]{
module Kernel
alias_method :hoge, :puts # => :hoge
alias_method "foo", :puts # => :foo
end
//}
alias との違いは以下の通りです。
* メソッド名は String または Symbol で指定します
* グローバル......String または Symbol で指定します。
@param original 元のメソッド名。String または Symbol で指定します。
@return 作成したエイリアスのメソッド名を表す Symbol を返します。
@see d:spec/def#alias
//emlist[例][ruby]{
module Kernel
alias_method :fo... -
Module
# alias _ method(new , original) -> self (24213.0) -
メソッドの別名を定義します。
...メソッドの別名を定義します。
//emlist[例][ruby]{
module Kernel
alias_method :hoge, :puts # => Kernel
end
//}
alias との違いは以下の通りです。
* メソッド名は String または Symbol で指定します
* グローバル変数の別名をつけることはで......w 新しいメソッド名。String または Symbol で指定します。
@param original 元のメソッド名。String または Symbol で指定します。
@return self を返します。
@see d:spec/def#alias
//emlist[例][ruby]{
module Kernel
alias_method :foo, :puts
end
foo "bar" # ba... -
IRB
:: ExtendCommandBundle # install _ alias _ method(to , from , override = NO _ OVERRIDE) (12201.0) -
メソッドのエイリアスを定義します。ライブラリ内部で使用します。
...@param override 新しいメソッド名が定義済みであった場合にそのメソッドを
上書きするかどうかを
IRB::ExtendCommandBundle::NO_OVERRIDE、
IRB::ExtendCommandBundle::OVERRIDE_PRIVATE_ONLY、
IRB::ExtendCom......mandBundle::OVERRIDE_ALL のいずれか
で指定します。... -
static VALUE rb
_ mod _ alias _ method(VALUE mod , VALUE newname , VALUE oldname) (12200.0) -
-
IRB
:: ExtendCommandBundle . irb _ original _ method _ name(method _ name) -> String (9106.0) -
method_name で指定したメソッドの irb 中でのエイリアスを返します。ライブ ラリ内部で使用します。
...method_name で指定したメソッドの irb 中でのエイリアスを返します。ライブ
ラリ内部で使用します。
@param method_name メソッド名を Symbol か文字列で指定します。
@see IRB::ExtendCommandBundle#install_alias_method... -
NEWS for Ruby 3
. 0 . 0 (12.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...positional arguments.
Code that resulted in deprecation warnings in Ruby 2.7 will now
result in ArgumentError or different behavior. 14183
* Procs accepting a single rest argument and keywords are no longer
subject to autosplatting. This now matches the behavior of Procs
accepting......single rest argument and no keywords.
16166
//emlist[][ruby]{
pr = proc{|*a, **kw| [a, kw]}
pr.call([1])
# 2.7 => [[1], {}]
# 3.0 => [[[1]], {}]
pr.call([1, {a: 1}])
# 2.7 => [[1], {:a=>1}] # and deprecation warning
# 3.0 => a=>1}, {}]
//}
* Arguments forwarding (`...`) now supports leadin......"private" and "public" methods now accept single array argument with a list of method names. 17314
* Module#attr_accessor, Module#attr_reader, Module#attr_writer and Module#attr methods now return an array of defined method names as symbols. 17314
* Module#alias_method now returns the define...