861件ヒット
[1-100件を表示]
(0.150秒)
ライブラリ
- ビルトイン (432)
- delegate (11)
- ipaddr (22)
-
irb
/ ext / math-mode (4) - mkmf (22)
- pathname (46)
-
rake
/ packagetask (11) -
rdoc
/ text (11) -
rexml
/ parsers / sax2parser (55) -
rexml
/ streamlistener (11) -
rubygems
/ version (11) - set (29)
- tsort (64)
-
webrick
/ httpresponse (55) -
webrick
/ httpserver (22) - win32ole (33)
クラス
- Delegator (11)
-
Gem
:: Version (11) - Hash (44)
- IPAddr (22)
-
IRB
:: Context (4) - Method (22)
- Module (170)
- Object (110)
- Pathname (46)
- Proc (5)
-
RDoc
:: Options (22) -
REXML
:: Parsers :: SAX2Parser (55) -
Rake
:: PackageTask (11) - Range (45)
- Refinement (3)
- Set (29)
- TracePoint (11)
- UnboundMethod (11)
-
WEBrick
:: HTTPResponse (55) -
WEBrick
:: HTTPServer (22) - WIN32OLE (33)
モジュール
- GC (11)
- Kernel (22)
-
RDoc
:: Text (11) -
REXML
:: StreamListener (11) - TSort (64)
キーワード
- < (11)
- <=> (11)
- === (29)
-
_ getproperty (11) -
_ invoke (11) -
_ setproperty (11) - ancestors (11)
-
append
_ features (11) - bind (11)
- body= (11)
- chunked= (11)
-
const
_ defined? (11) -
const
_ get (11) -
const
_ source _ location (5) - constants (11)
-
content
_ length (11) -
content
_ length= (11) - cover? (12)
-
defined
_ class (11) -
each
_ child (22) -
each
_ entry (13) -
each
_ strongly _ connected _ component (21) -
each
_ strongly _ connected _ component _ from (21) - entitydecl (11)
- entries (11)
- eql? (11)
- extend (11)
-
garbage
_ collect (11) -
has
_ key? (11) -
import
_ methods (3) - include? (55)
-
include
_ line _ numbers (11) - included (11)
- inspect (11)
-
is
_ a? (11) - key? (11)
-
kind
_ of? (11) - listen (55)
- markup (11)
-
math
_ mode= (4) - member? (33)
- methods (11)
- mount (11)
-
package
_ files (11) -
prepend
_ features (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) -
respond
_ to? (11) -
respond
_ to _ missing? (22) -
ruby2
_ keywords (5) -
singleton
_ methods (11) -
strongly
_ connected _ components (11) -
to
_ s (22) -
try
_ cpp (22) - tsort (11)
-
virtual
_ host (11)
検索結果
先頭5件
-
Module
# include(*mod) -> self (18180.0) -
モジュール mod をインクルードします。
...ます。
@param mod Module のインスタンス( Enumerable など)を指定します。
@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 (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]
//}
モジュールの機能追加は、クラスの継承関係の間にそのモジュールが挿入
される... -
RDoc
:: Options # include _ line _ numbers -> bool (9118.0) -
コマンドライン引数の --include-line-numbers を指定していた場合に true を返します。そうでない場合は false を返します。
...コマンドライン引数の --include-line-numbers を指定していた場合に true
を返します。そうでない場合は false を返します。... -
RDoc
:: Options # rdoc _ include -> [String] (9118.0) -
コマンドライン引数の --include オプションで指定したディレクトリを文字列 の配列で返します。
...コマンドライン引数の --include オプションで指定したディレクトリを文字列
の配列で返します。
指定しなかった場合は ['.'] を返します。... -
Rake
:: PackageTask # package _ files -> Rake :: FileList (9107.0) -
パッケージに含むファイルリストを返します。
...記載例とする
require 'rake/packagetask'
IO.write("test1.rb", "test")
IO.write("test2.rb", "test")
Rake::PackageTask.new("sample", "1.0.0") do |package_task|
package_task.package_files # => []
package_task.package_files.include("*.rb")
package_task.package_files # => ["test1.rb", "test2... -
Object
# respond _ to?(name , include _ all = false) -> bool (6220.0) -
オブジェクトがメソッド name を持つとき真を返します。
...メソッド name に応答できることをいいます。
Windows での Process.fork や GNU/Linux での File.lchmod の
ような NotImplementedError が発生する場合は false を返します。
※ NotImplementedError が発生する場合に false を返すのは
Rubyの組み込み......otImplementedError が発生する場合は true を返します。
メソッドが定義されていない場合は、Object#respond_to_missing? を呼
び出してその結果を返します。
@param name Symbol または文字列で指定するメソッド名です。
@param include_all priva......と protected メソッドを確認の対象に
含めるかを true か false で指定します。省略した場合
は false(含めない) を指定した事になります。
//emlist[][ruby]{
class F
def hello
"Bonjour"
end
end
class D
private... -
Object
# respond _ to _ missing?(symbol , include _ private) -> bool (6214.0) -
自身が symbol で表されるメソッドに対し BasicObject#method_missing で反応するつもりならば真を返します。
...Object#respond_to? はメソッドが定義されていない場合、
デフォルトでこのメソッドを呼びだし問合せます。
BasicObject#method_missing を override した場合にこのメソッドも
override されるべきです。
false を返します。
@param symbol メ......ンボル
@param include_private private method も含めたい場合に true が渡されます
//emlist[例][ruby]{
class Sample
def method_missing(name, *args)
if name =~ /^to_*/
[name, *args] # => [:to_sample, "sample args1", "sample args2"]
return
else
super
end......end
def respond_to_missing?(sym, include_private)
(sym =~ /^to_*/) ? true : super
end
end
s = Sample.new
s.to_sample("sample args1", "sample args2")
s.respond_to?(:to_sample) # => true
s.respond_to?(:sample) # => false
//}
@see Object#respond_to?, BasicObject#method_missing... -
Delegator
# respond _ to _ missing?(m , include _ private) -> bool (6208.0) -
@param m メソッド名を指定します。
...@param m メソッド名を指定します。
@param include_private 真を指定すると private メソッドも調べます。... -
Object
# private _ methods(include _ inherited = true) -> [Symbol] (6208.0) -
そのオブジェクトが理解できる private メソッド名の一覧を返します。
...そのオブジェクトが理解できる private メソッド名の一覧を返します。
@param include_inherited 偽となる値を指定すると自身のクラスのスーパークラスで定義されたメソッドを除きます。
@see Module#private_instance_methods,Object#methods,Ob... -
Object
# protected _ methods(include _ inherited = true) -> [Symbol] (6208.0) -
そのオブジェクトが理解できる protected メソッド名の一覧を返します。
...のオブジェクトが理解できる protected メソッド名の一覧を返します。
@param include_inherited 偽となる値を指定すると自身のクラスのスーパークラスで定義されたメソッドを除きます。
@see Module#protected_instance_methods,Object#methods,O... -
Object
# public _ methods(include _ inherited = true) -> [Symbol] (6208.0) -
そのオブジェクトが理解できる public メソッド名の一覧を返します。
...そのオブジェクトが理解できる public メソッド名の一覧を返します。
@param include_inherited 偽となる値を指定すると自身のクラスのスーパークラスで定義されたメソッドを除きます。
@see Module#public_instance_methods,Object#methods,Obje...