るりまサーチ

最速Rubyリファレンスマニュアル検索!
37件ヒット [1-37件を表示] (0.104秒)
トップページ > クエリ:i[x] > クエリ:end[x] > クエリ:alias_method[x]

別のキーワード

  1. _builtin end
  2. ripper end_seen?
  3. _builtin exclude_end?
  4. _builtin end_with?
  5. io seek_end

ライブラリ

クラス

モジュール

検索結果

Module#alias_method(new, original) -> Symbol (24231.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...
...o, :puts
end


foo "bar" # bar
//}...

Module#alias_method(new, original) -> self (24225.0)

メソッドの別名を定義します。

...メソッドの別名を定義します。

//emlist[例][ruby]{
module Kernel
alias_method
:hoge, :puts # => Kernel
end

//}

alias との違いは以下の通りです。

* メソッド名は String または Symbol で指定します
* グローバル変数の別名をつけることはで...
...いメソッド名。String または Symbol で指定します。

@param original 元のメソッド名。String または Symbol で指定します。

@return self を返します。

@see d:spec/def#alias

//emlist[例][ruby]{
module Kernel
alias_method
:foo, :puts
end


foo "bar" # bar
//}...

IRB::ExtendCommandBundle#install_alias_method(to, from, override = NO_OVERRIDE) (15201.0)

メソッドのエイリアスを定義します。ライブラリ内部で使用します。

...am override 新しいメソッド名が定義済みであった場合にそのメソッドを
上書きするかどうかを
I
RB::ExtendCommandBundle::NO_OVERRIDE、
I
RB::ExtendCommandBundle::OVERRIDE_PRIVATE_ONLY、
I
RB::ExtendCommandB...
...undle::OVERRIDE_ALL のいずれか
で指定します。...

IRB::ExtendCommandBundle.irb_original_method_name(method_name) -> String (12106.0)

method_name で指定したメソッドの irb 中でのエイリアスを返します。ライブ ラリ内部で使用します。

...method_name で指定したメソッドの irb 中でのエイリアスを返します。ライブ
ラリ内部で使用します。

@param method_name メソッド名を Symbol か文字列で指定します。

@see IRB::ExtendCommandBundle#install_alias_method...

NEWS for Ruby 3.0.0 (60.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...
...tion warning
# 3.0 => a=>1}, {}]
//}

* Arguments forwarding (`...`) now supports leading arguments.
16378

//emlist{
def method_missing(meth, ...)
send(:"do_#{meth}", ...)
end

//}

* Pattern matching (`case/in`) is no longer experimental. 17260
* One-line pattern matching is redesig...
..."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...

絞り込み条件を変える