るりまサーチ

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

別のキーワード

  1. matrix l
  2. kernel $-l
  3. _builtin $-l
  4. lupdecomposition l
  5. l matrix

ライブラリ

キーワード

検索結果

Module#append_features(module_or_class) -> self (3213.0)

モジュール(あるいはクラス)に self の機能を追加します。

...クラス)に self の機能を追加します。

このメソッドは Module#include の実体であり、
include を Ruby で書くと以下のように定義できます。

//emlist[例][ruby]{
def include(*modules)
module
s.reverse_each do |mod|
# append_features や included はプラ...
...イベートメソッドなので
# 直接 mod.append_features(self) などとは書けない
mod.__send__(:append_features, self)
mod.__send__(:included, self)
end
end
//}

@see Module#included...

Module#ruby2_keywords(method_name, ...) -> nil (3207.0)

For the given method names, marks the method as passing keywords through a normal argument splat. This should only be called on methods that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the method such that if the method is called with keyword arguments, the final hash argument is marked with a special flag such that if it is the final element of a normal argument splat to another method call, and that method call does not include explicit keywords or a keyword splat, the final element is interpreted as keywords. In other words, keywords will be passed through the method to other methods.

...hrough
a normal argument splat. This should only be called on methods that
accept an argument splat (`*args`) but not explicit keywords or a
keyword splat. It marks the method such that if the method is called
with keyword arguments, the final hash argument is marked with a special
flag such that...
...is the final element of a normal argument splat to
another method call, and that method call does not include explicit
keywords or a keyword splat, the final element is interpreted as
keywords. In other words, keywords will be passed through the method to
other methods.

This should only be used fo...
...thods that delegate keywords to another
method, and only for backwards compatibility with Ruby versions before
2.7.

This method will probably be removed at some point, as it exists only
for backwards compatibility. As it does not exist in Ruby versions
before 2.7, check that the module responds to...

Module#extend_object(obj) -> object (3113.0)

Object#extend の実体です。オブジェクトにモジュールの機能を追加します。

...

//emlist[例][ruby]{
def extend(*modules)
module
s.reverse_each do |mod|
# extend_object や extended はプライベートメソッドなので
# 直接 mod.extend_object(self) などとは書けない
mod.__send__(:extend_object, self)
mod.__send__(:extended, self)
end
end...
...では、self に定義されて
いるインスタンスメソッドを obj の特異メソッドとして追加します。

@param obj self の機能を追加するオブジェクトを指定します。

@return obj で指定されたオブジェクトを返します。

@see Module#extended...