るりまサーチ

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

別のキーワード

  1. module attr
  2. module public
  3. module protected
  4. module private
  5. module constants

ライブラリ

クラス

オブジェクト

検索結果

Module#using(module) -> self (39226.0)

引数で指定したモジュールで定義された拡張を現在のクラス、モジュールで有 効にします。

...ルで有
効にします。

有効にした拡張の有効範囲については以下を参照してください。

* https://docs.ruby-lang.org/en/master/syntax/refinements_rdoc.html#label-Scope

@param module 有効にするモジュールを指定します。

@see Module#refine, main.using...

Module#refine(klass) { ... } -> Module (21159.0)

引数 klass で指定したクラスまたはモジュールだけに対して、ブロックで指定した機能を提供で きるモジュールを定義します。定義した機能は Module#refine を使用せずに直 接 klass に対して変更を行う場合と異なり、限られた範囲のみ有効にできます。 そのため、既存の機能を局所的に修正したい場合などに用いる事ができます。

...モジュールだけに対して、ブロックで指定した機能を提供で
きるモジュールを定義します。定義した機能は Module#refine を使用せずに直
接 klass に対して変更を行う場合と異なり、限られた範囲のみ有効にできます。
そのた...
...zine.rubyist.net/articles/0041/0041-200Special-refinement.html
* https://docs.ruby-lang.org/en/master/syntax/refinements_rdoc.html

定義した機能は main.using, Module#using を実行した場合のみ
有効になります。

@param klass 拡張する対象のクラスまたはモジュー...
...機能を持つ無名のモジュールを返します。

//emlist[例][ruby]{
class C
def foo
puts "C#foo"
end
end

module
M
refine C do
def foo
puts "C#foo in M"
end
end
end

x = C.new
x.foo # => "C#foo"

using
M

x = C.new
x.foo # => "C#foo in M"
//}

@see main.using...

main.using(module) -> self (18244.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...

NEWS for Ruby 3.0.0 (168.0)

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

...rdoc-ref:doc/syntax/comments.rdoc@Magic+Comments] for more details.
17273
* A {static analysis}[rdoc-label:label-Static+analysis] foundation is
introduced.
* {RBS}[rdoc-label:label-RBS] is introduced. It is a type definition
language for Ruby programs.
* {TypeProf}[rdoc...
...is now a SyntaxError instead of a LocalJumpError. 15575
* When a class variable is overtaken by the same definition in an
ancestor class/module, a RuntimeError is now raised (previously,
it only issued a warning in verbose mode). Additionally, accessing a
class variable from the t...
...C; end
module
M1; end
module
M2; end
C.include M1
M1.include M2
p C.ancestors #=> [C, M1, M2, Object, Kernel, BasicObject]
//}

* Mutex
* `Mutex` is now acquired per-`Fiber` instead of per-`Thread`. This change should be compatible for essentially all usages and avoids blocking when using a sc...

NEWS for Ruby 2.1.0 (132.0)

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

...l
* 追加: Kernel#singleton_method(Object#singleton_method)

* Module
* 追加: Module#using, which activates refinements of the specified module only
in the current class or module definition.
* 追加: Module#singleton_class? レシーバーが特異クラスであれば true...
...バーが通常のクラスやモジュールであれば false を返します。
* 拡張: Module#refine はもはや実験的な機能でなくなりました
* 拡張: Module#include と Module#prepend はパブリックメソッドになりました

* Mutex
* Mutex#owned? はも...
...rake.rubyforge.org/doc/release_notes/rake-10_1_0_rdoc.html
http://rake.rubyforge.org/doc/release_notes/rake-10_0_3_rdoc.html

* rbconfig
* 追加: RbConfig::SIZEOF C の型のサイズを提供するために追加しました。

* rdoc
* 4.1.0 に更新。主にデフォルトの...

絞り込み条件を変える

NEWS for Ruby 2.0.0 (120.0)

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

...* Module
* 追加: Module#prepend 指定したモジュールを self の継承チェインの先頭に
「追加する」ことで self の定数、メソッド、モジュール変数を「上書き」します。
* 追加: Module.prepended, Module.prepend_features は Module.inc...
...nd efficient implementation.

* toplevel
* added method:
* added main.define_method which defines a global function.
* added main.using, which imports refinements into the current file or
eval string. [experimental]

=== 組み込みクラスの互換性 (機能追加とバ...
...mpatible with previous rake versions and
contains many bug fixes.
* See http://rake.rubyforge.org/doc/release_notes/rake-0_9_5_rdoc.html

* rdoc
* 4.0 に更新
* 後方互換性に関する大きな変更がありました。注目すべき最大の変更は ri データ...

Ruby用語集 (108.0)

Ruby用語集 A B C D E F G I J M N O R S Y

...env

: RD(Ruby Document format)
Ruby スクリプト中に記述することを念頭に作られたドキュメントフォーマット。

: RDoc
Ruby スクリプトからそのスクリプトのドキュメントを生成するシステム。

クラス、モジュール、メソッド...
...せてドキュメントの HTML を生成する。

参照:rdoc

: refinement
既存のクラスやモジュールを特定のスコープでのみ改変する仕組み。

参照:Module#refine、Module#using、main.using

: Ruby Central
Rubyのサポートと世界の Ruby コミュニ...
...ションの指定は非 Unix 系の OS でも
有効である。

===[a:Y] Y

: YARD
Ruby 用ドキュメント生成ツール。

https://yardoc.org/


===[a:a] あ

: アクセッサー
: accessor
オブジェクトの特定のインスタンス変数について、その値を読み出...