るりまサーチ

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

別のキーワード

  1. psych alias
  2. module alias_method
  3. alias anchor
  4. _builtin alias_method
  5. alias anchor=

検索結果

NEWS for Ruby 2.5.0 (26006.0)

NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...NEWS for Ruby 2.5.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス...
...トは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。

== 2.4.0 以降の変更

=== 言語仕様の変更

* トップレベルの定数参照を削除しました 11547
* do/end ブロック内部で rescue/else/ensure を書けるようになりまし...
...ter はパブリックメソッドになりました 14132
* Module#define_method, Module#alias_method, Module#undef_method, Module#remove_method はパブリックメソッドになりました 14133

* Numeric
* Numeric#step は > で0と比較できない引数が与えられたときco...

NEWS for Ruby 3.0.0 (26006.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...NEWS for Ruby 3.0.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス...
...ord arguments are now separated from 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 matche...
...ate" 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 defined ali...

Module#alias_method(new, original) -> Symbol (18219.0)

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

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

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

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

* メソッド名は String または Symbol で指定します
* グローバル変数の別...
...ドに対して使用することはできません。

@param new 新しいメソッド名。String または Symbol で指定します。

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

@return 作成したエイリアスのメソッド名を表す Symbol...
...を返します。

@see d:spec/def#alias

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

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

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

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

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

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

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

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

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

@return self を返します。

@see d:spec/def#alias

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

foo...

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

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

...のメソッドを
上書きするかどうかを
IRB::ExtendCommandBundle::NO_OVERRIDE、
IRB::ExtendCommandBundle::OVERRIDE_PRIVATE_ONLY、
IRB::ExtendCommandBundle::OVERRIDE_ALL のいずれか
で指定します。...

絞り込み条件を変える

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

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

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

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

@see IRB::ExtendCommandBundle#install_alias_method...

static VALUE rb_mod_alias_method(VALUE mod, VALUE newname, VALUE oldname) (6200.0)

irb/completion (6006.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 = Object.new
#<Object:0...
...(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 foo.send
foo.__send__...

クラス/メソッドの定義 (66.0)

クラス/メソッドの定義 * クラス/メソッドの定義: * class * singleton_class * module * method * operator * nest_method * eval_method * singleton_method * class_method * limit * 定義に関する操作: * alias * undef * defined

...メソッドの定義:
* class
* singleton_class
* module
* method
* operator
* nest_method
* eval_method
* singleton_method
* class_method
* limit
* 定義に関する操作:
* alias
* undef
* defined

===[a:class] クラス定義

//emlist[例]...
...end
# ...
end
//}

文法:

class 識別子 [`<' superclass ]
式..
end

文法:

class 識別子 [`<' superclass ]
式..
[rescue [error_type,..] [=> evar] [then]
式..]..
[else
式..]
[ens...
...出し等の一切の評価は行われません。

メソッドの定義内で別名を付けるにはModuleクラスのメソッド
Module#alias_method を利用して下さい。

別名を付けられたメソッドは、その時点でのメソッド定義を引き継
ぎ、元のメソッド...