ライブラリ
クラス
- Method (22)
- Module (115)
- Object (33)
- Range (17)
- UnboundMethod (11)
モジュール
-
ERB
:: Util (22) - Kernel (22)
-
REXML
:: StreamListener (11)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - <= (11)
- <=> (11)
- Closure (11)
-
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 1 . 0 (3) - Observable (11)
-
Profiler
_ _ (6) - ancestors (11)
- bind (11)
- cgi (11)
-
const
_ source _ location (5) - cover? (17)
- entitydecl (11)
- h (11)
-
html
_ escape (11) - include? (11)
- inspect (11)
-
is
_ a? (11) -
kind
_ of? (11) -
method
_ defined? (11) - methods (11)
-
private
_ method _ defined? (11) -
protected
_ method _ defined? (11) -
public
_ method _ defined? (11) - rdoc (11)
-
rexml
/ parsers / sax2parser (11) -
rexml
/ parsers / streamparser (11) -
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 4 feature (11) -
to
_ s (11) -
try
_ cpp (22) - クラス/メソッドの定義 (11)
- 変数と定数 (11)
検索結果
先頭5件
-
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>))...