るりまサーチ

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

別のキーワード

  1. net/ftp lang
  2. mlsxentry lang
  3. lang net/ftp
  4. lang
  5. lang net::ftp::mlsxentry

ライブラリ

クラス

オブジェクト

キーワード

検索結果

main.using(module) -> self (18125.0)

引数で指定したモジュールで定義された拡張を有効にします。

...* https://docs.ruby-lang.org/en/master/syntax/refinements_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".downca...
...se # => "ABC"
//}

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

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

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

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

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

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

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

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

NEWS for Ruby 2.0.0 (72.0)

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

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

== 1.9.3 以降の変更

=== 言語仕様の変更

* キーワード引数を追加しました
*...
...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 データ...

NEWS for Ruby 2.1.0 (48.0)

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

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

== 2.0.0 以降の変更

=== 言語仕様の変更

* キーワード引数のデフォルト値が...
...受け付けるようになりました

* Kernel
* 追加: 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?...
...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 に更新。主にデフォルトの...

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

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

...* https://magazine.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...
...* https://magazine.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 拡張する対象のクラスまた...

絞り込み条件を変える

Ruby用語集 (36.0)

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

...グラミング言語。
型推論を持った静的型付け言語であり、処理系はコンパイラーである。

https://ja.crystal-lang.org/

: CSI 方式
CSI は Code Set Independent の頭字語。
プログラミング言語の処理系が文字列を扱う際のエンコーデ...
...env

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

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

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

参照:rdoc

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

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

: Ruby Central
Rubyのサポートと世界の Ruby コミュニ...