ライブラリ
- ビルトイン (426)
-
cgi
/ core (33) - csv (11)
- dbm (11)
- delegate (11)
- gdbm (11)
- ipaddr (22)
-
irb
/ ext / math-mode (4) -
minitest
/ spec (1) -
minitest
/ unit (2) - mkmf (55)
- pathname (44)
- rake (22)
-
rake
/ packagetask (11) -
rdoc
/ context (44) -
rdoc
/ text (11) -
rexml
/ document (11) -
rexml
/ parsers / sax2parser (55) -
rexml
/ streamlistener (11) -
rubygems
/ version (11) - sdbm (11)
- set (15)
- tsort (43)
-
webrick
/ httpresponse (55) -
webrick
/ httpserver (22) - win32ole (33)
クラス
- Array (11)
-
CSV
:: Row (11) - DBM (11)
- Delegator (11)
- GDBM (11)
-
Gem
:: Version (11) - Hash (11)
- IPAddr (22)
-
IRB
:: Context (4) - Method (22)
- Module (197)
- Object (100)
- Pathname (44)
-
RDoc
:: Context (44) -
RDoc
:: Options (22) -
REXML
:: AttlistDecl (11) -
REXML
:: Parsers :: SAX2Parser (55) -
Rake
:: FileList (22) -
Rake
:: PackageTask (11) - Range (17)
- Refinement (3)
- SDBM (11)
- Set (15)
- String (11)
- TracePoint (11)
- UnboundMethod (11)
-
WEBrick
:: HTTPResponse (55) -
WEBrick
:: HTTPServer (22) - WIN32OLE (33)
モジュール
-
CGI
:: QueryExtension (33) - Enumerable (22)
- GC (11)
- Kernel (55)
-
MiniTest
:: Assertions (2) -
RDoc
:: Text (11) -
REXML
:: StreamListener (11) - TSort (43)
キーワード
- < (11)
- <= (11)
- <=> (11)
- === (11)
- > (11)
- >= (11)
-
_ getproperty (11) -
_ invoke (11) -
_ setproperty (11) -
add
_ include (11) -
add
_ to (11) -
assert
_ includes (1) -
assert
_ send (1) - bind (11)
- body= (11)
- chunked= (11)
-
const
_ defined? (11) -
const
_ get (11) -
const
_ source _ location (5) - constants (11)
-
content
_ length (11) -
content
_ length= (11) -
defined
_ class (11) -
dir
_ config (11) -
each
_ child (22) -
each
_ entry (11) -
each
_ strongly _ connected _ component (11) -
each
_ strongly _ connected _ component _ from (21) -
enable
_ config (22) - entitydecl (11)
- entries (11)
- eql? (11)
-
garbage
_ collect (11) -
has
_ key? (11) -
import
_ methods (3) - include? (154)
-
include
_ line _ numbers (11) - included (11)
-
included
_ modules (11) - includes (11)
-
initialize
_ methods _ etc (11) - inspect (11)
-
is
_ a? (11) - key? (11)
-
kind
_ of? (11) - listen (55)
- markup (11)
-
math
_ mode= (4) - member? (21)
-
method
_ defined? (11) - methods (11)
- mount (11)
-
must
_ include (1) -
package
_ files (11) -
private
_ instance _ methods (11) -
private
_ method _ defined? (11) -
private
_ methods (11) -
protected
_ method _ defined? (11) -
protected
_ methods (11) -
public
_ method _ defined? (11) -
public
_ methods (11) -
rdoc
_ include (11) - resolve (11)
-
respond
_ to? (11) -
respond
_ to _ missing? (22) -
ruby2
_ keywords (5) -
singleton
_ methods (11) -
to
_ s (22) -
tsort
_ each (11) -
virtual
_ host (11) -
with
_ config (22)
検索結果
先頭5件
-
Module
# include(*mod) -> self (30368.0) -
モジュール mod をインクルードします。
...定します。
@raise ArgumentError 継承関係が循環してしまうような include を行った場合に発生します。
//emlist[例][ruby]{
module M
end
module M2
include M
end
module M
include M2
end
//}
実行結果:
-:3:in `append_features': cyclic include detected (Argument......in `include'
from -:3
インクルードとは、指定されたモジュールの定義
(メソッド、定数) を引き継ぐことです。
インクルードは多重継承の代わりに用いられており、 mix-in とも呼びます。
//emlist[例][ruby]{
class C
include Fi......leTest
include Math
end
p C.ancestors
# => [C, Math, FileTest, Object, Kernel]
//}
モジュールの機能追加は、クラスの継承関係の間にそのモジュールが挿入
されることで実現されています。従って、メソッドの探索などは
スーパークラスよ... -
Rake
:: FileList # include(*filenames) -> self (30314.0) -
ファイル名のパターンを追加リストに登録します。 配列が与えられた場合、配列の各要素が追加されます。
...ターンを追加リストに登録します。
配列が与えられた場合、配列の各要素が追加されます。
@param filenames 追加するファイル名のパターンを指定します。
例:
file_list.include("*.java", "*.cfg")
file_list.include %w( math.c lib.h *.o )... -
RDoc
:: Options # include _ line _ numbers -> bool (24518.0) -
コマンドライン引数の --include-line-numbers を指定していた場合に true を返します。そうでない場合は false を返します。
...コマンドライン引数の --include-line-numbers を指定していた場合に true
を返します。そうでない場合は false を返します。... -
String
# include?(substr) -> bool (24320.0) -
文字列中に部分文字列 substr が含まれていれば真を返します。
...文字列中に部分文字列 substr が含まれていれば真を返します。
@param substr 検索する文字列
//emlist[例][ruby]{
"hello".include? "lo" #=> true
"hello".include? "ol" #=> false
"hello".include? ?h #=> true
//}... -
MiniTest
:: Assertions # assert _ includes(collection , object , message = nil) -> true (24307.0) -
与えられたコレクションにオブジェクトが含まれている場合、検査にパスしたことになります。
...与えられたコレクションにオブジェクトが含まれている場合、検査にパスしたことになります。
@param collection 任意のコレクションを指定します。
@param object 任意のオブジェクトを指定します。
@param message 検査に失敗した......Proc を指定します。Proc である場合は Proc#call した
結果を使用します。
@raise MiniTest::Assertion 第一引数のオブジェクトが include? メソッドを持たない場合に発生します。
与えられたコレクション... -
RDoc
:: Context # add _ include(an _ include) -> () (18631.0) -
引数で指定した RDoc::Include オブジェクトを追加します。
...引数で指定した RDoc::Include オブジェクトを追加します。
@param an_include RDoc::Include オブジェクトを指定します。... -
RDoc
:: Context # includes -> [RDoc :: Include] (18618.0) -
追加された RDoc::Include の配列を返します。
...追加された RDoc::Include の配列を返します。... -
RDoc
:: Options # rdoc _ include -> [String] (18518.0) -
コマンドライン引数の --include オプションで指定したディレクトリを文字列 の配列で返します。
...コマンドライン引数の --include オプションで指定したディレクトリを文字列
の配列で返します。
指定しなかった場合は ['.'] を返します。... -
Module
# included(class _ or _ module) -> () (18341.0) -
self が Module#include されたときに対象のクラスまたはモジュー ルを引数にしてインタプリタがこのメソッドを呼び出します。
...e#include されたときに対象のクラスまたはモジュー
ルを引数にしてインタプリタがこのメソッドを呼び出します。
@param class_or_module Module#include を実行したオブジェクト
//emlist[例][ruby]{
module Foo
def self.included(mod)
p "#{mod} in......clude #{self}"
end
end
class Bar
include Foo
end
# => "Bar include Foo"
//}
@see Module#append_features... -
Range
# include?(obj) -> bool (18326.0) -
obj が範囲内に含まれている時に true を返します。 そうでない場合は、false を返します。
...象のオブジェクトを指定します。
//emlist[例][ruby]{
p ("a" .. "c").include?("b") # => true
p ("a" .. "c").include?("B") # => false
p ("a" .. "c").include?("ba") # => false
p ("a" .. "c").cover?("ba") # => true
p (1 .. 3).include?(1.5) # => true
//}
@see d:spec/control#case
@see... -
Module
# include?(mod) -> bool (18320.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
//}...