るりまサーチ

最速Rubyリファレンスマニュアル検索!
388件ヒット [1-100件を表示] (0.025秒)

別のキーワード

  1. _builtin include?
  2. socket mcast_include
  3. set include?
  4. dbm include?
  5. gdbm include?

検索結果

<< 1 2 3 ... > >>

Module#include(*mod) -> self (18173.0)

モジュール mod をインクルードします。

...てしまうような include を行った場合に発生します。

//emlist[例][ruby]{
module M
end
module M2
include
M
end
module M
include
M2
end
//}

実行結果:

-:3:in `append_features': cyclic include detected (ArgumentError)
from -:3:in `include'
from -:3...
...
インクルードは多重継承の代わりに用いられており、 mix-in とも呼びます。

//emlist[例][ruby]{
class C
include
FileTest
include
Math
end

p C.ancestors

# => [C, Math, FileTest, Object, Kernel]
//}

モジュールの機能追加は、クラスの継承関係の...
...ッド探索の順序です)。

同じモジュールを二回以上 include すると二回目以降は無視されます。

//emlist[例][ruby]{
module M
end
class C1
include
M
end
class C2 < C1
include
M # この include は無視される
end

p C2.ancestors # => [C2, C1, M, Object, Ker...

Module#<(other) -> bool | nil (18142.0)

比較演算子。self が other の子孫である場合、 true を返します。 self が other の先祖か同一のクラス/モジュールである場合、false を返します。

...//emlist[例][ruby]{
module Foo
end
class Bar
include
Foo
end
class Baz < Bar
end
class Qux
end
p Bar < Foo # => true
p Baz < Bar # => true
p Baz < Foo # => true
p Baz < Qux # => nil
p Baz > Qux # => nil

p Foo < Object.new # => in `<': compared with non class/module (TypeError...

Module#include?(mod) -> bool (6125.0)

self かその親クラス / 親モジュールがモジュール mod を インクルードしていれば true を返します。

...クラス / 親モジュールがモジュール mod を
インクルードしていれば true を返します。

@param mod Module を指定します。

//emlist[例][ruby]{
module M
end
class C1
include
M
end
class C2 < C1
end

p C1.include?(M) # => true
p C2.include?(M) # => true
//}...

Module#<=>(other) -> Integer | nil (6112.0)

self と other の継承関係を比較します。

...のクラスやモジュール

//emlist[例][ruby]{
module Foo
end
class Bar
include
Foo
end
class Baz < Bar
end
class Qux
end
p Bar <=> Foo # => -1
p Baz <=> Bar # => -1
p Baz <=> Foo # => -1
p Baz <=> Qux # => nil
p Qux <=> Baz # => nil

p Baz <=> Object.new # => nil
//}...

Module#<=(other) -> bool | nil (6106.0)

比較演算子。self が other の子孫であるか、self と other が 同一クラスである場合、 true を返します。 self が other の先祖である場合、false を返します。

...@see Module#<

//emlist[例][ruby]{
module Foo; end
module Bar
include
Foo
end
module Baz
prepend Foo
end

Bar.ancestors # => [Bar, Foo]
Foo <= Bar # => false
Bar <= Foo # => true

Baz.ancestors # => [Foo, Baz]
Foo <= Baz # => false
Baz <= Foo # => true

Foo <= Foo # => true
Foo <= Object # =>...

絞り込み条件を変える

ruby 1.8.4 feature (420.0)

ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。

...

== 目次

* ((<ruby 1.8.4 feature/Ruby本体>))
* ((<ruby 1.8.4 feature/Symbol [bug]>))
* ((<ruby 1.8.4 feature/Symbol [bug]>))
* ((<ruby 1.8.4 feature/super [bug]>))
* ((<ruby 1.8.4 feature/正規表現 [bug]>))
* ((<ruby 1.8.4 feature/シグナル [bug]>))
* ((<ruby 1.8.4 feature/...
...>))
* ((<ruby 1.8.4 feature/UnboundMethod#bind [bug]>))
* ((<ruby 1.8.4 feature/set_trace_func [bug]>))
* ((<ruby 1.8.4 feature/set_trace_func [change]>))
* ((<ruby 1.8.4 feature/printf [bug]>))
* ((<ruby 1.8.4 feature/Hash [bug]>))
* ((<ruby 1.8.4 feature/test [bug]>))
* ((<ruby 1.8.4...
...ソッド中で
superを使えなかったバグを修正しました。((<ruby-dev:27964>))

module Foo
def initialize
super
end
end

class Bar
include
Foo
def initialize
Foo.instance_method(:initialize).bin...

1.6.8から1.8.0への変更点(まとめ) (204.0)

1.6.8から1.8.0への変更点(まとめ) * ((<1.6.8から1.8.0への変更点(まとめ)/インタプリタの変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたクラス/モジュール>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたメソッド>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加された定数>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張されたクラス/メソッド(互換性のある変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/変更されたクラス/メソッド(互換性のない変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/文法の変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/正規表現>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Marshal>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Windows 対応>)) * ((<1.6.8から1.8.0への変更点(まとめ)/廃止された(される予定の)機能>)) * ((<1.6.8から1.8.0への変更点(まとめ)/ライブラリ>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張ライブラリAPI>)) * ((<1.6.8から1.8.0への変更点(まとめ)/バグ修正>)) * ((<1.6.8から1.8.0への変更点(まとめ)/サポートプラットフォームの追加>))

...更点(まとめ)
* ((<1.6.8から1.8.0への変更点(まとめ)/インタプリタの変更>))
* ((<1.6.8から1.8.0への変更点(まとめ)/追加されたクラス/モジュール>))
* ((<1.6.8から1.8.0への変更点(まとめ)/追加されたメソッド>))
* ((<1.6.8から1.8.0への...
...)/追加された定数>))
* ((<1.6.8から1.8.0への変更点(まとめ)/拡張されたクラス/メソッド(互換性のある変更)>))
* ((<1.6.8から1.8.0への変更点(まとめ)/変更されたクラス/メソッド(互換性のない変更)>))
* ((<1.6.8から1.8.0への変更点(...
...[new]
: ((<NoMethodError>)) [new]

((<Process::Status>)) の追加により、(({$?})) の値も整数からこのクラ
スのインスタンスになりました。

=== クラス階層

: ((<File::Constants>))

File::Constants は、File クラスでなく IO クラスが include する...

rdoc (126.0)

RDoc は Ruby のドキュメント生成を行うためのライブラリです。rdoc という ドキュメント生成のためのコマンドも含んでいます。

...ションです。 JavaDoc と同様に、ソースを解析し、クラス、モ
ジュール、メソッドの定義を抜き出してきます(include,require もです)。そ
してこれらの内容とその直前に書かれたコメントを併合し、ドキュメントを出
力します(...
...のみが
処理されます。

===[a:usage] 使いかた

RDoc はコマンドラインから以下のようにして起動します。

$ rdoc <options> [name...]

ファイルをパースし、そこに含まれている情報を集め、出力します。こうして
全ファイルに渡る...
...。指
定しなかった場合は png が使われます。--diagram が必要です。

: --include dir,…

:include: 命令でファイルを探すディレクトリを指定します。 --include
複数使ってもかまいません。これを指定しなくとも処理中のファ...

Object#methods(include_inherited = true) -> [Symbol] (113.0)

そのオブジェクトに対して呼び出せるメソッド名の一覧を返します。 このメソッドは public メソッドおよび protected メソッドの名前を返します。

...


@param include_inherited 引数が偽の時は Object#singleton_methods(false) と同じになります。

//emlist[例1][ruby]{
class Parent
private; def private_parent() end
protected; def protected_parent() end
public; def public_parent() end
end

class Foo < Parent
priva...
...te; def private_foo() end
protected; def protected_foo() end
public; def public_foo() end
end

obj = Foo.new
class <<obj
private; def private_singleton() end
protected; def protected_singleton() end
public; def public_singleton() end
end

# あるオブジェク...

ruby 1.6 feature (84.0)

ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。

...ruby 1.6 feature
ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン
になります。

((<stable-snapshot|URL:ftp://ftp.netlab.co.jp/pub/lang/ruby/stable-snapshot.tar.gz>)) は、日々更新される安定版の最新ソースです。

== 1.6.8 (2002-12-24) ->...
...-> 1.6.8 (2002-12-24)

: 2002-10-02: Thread (cygwin)

Cygwin で、Thread の切替えが行われないことがありました。
((<ruby-list:36058>)), ((<ruby-list:24637>))

: 2002-10-01: Socket (win)

Windows でのソケットの問題が1つ解決されたようです。(どのような...
...9>)),((<ruby-dev:16153>))。

: 数値リテラルの `_'

`_' を置ける場所の規則が見直され、String#hex などの数値変換メソッド
の挙動と共に規則が統一されました。((<rubyist:1018>)), ((<ruby-dev:15684>)),
((<ruby-dev:15757>))

: ((<Module/include>))...

絞り込み条件を変える

<< 1 2 3 ... > >>