949件ヒット
[1-100件を表示]
(0.146秒)
ライブラリ
- ビルトイン (489)
- delegate (12)
- ipaddr (24)
-
irb
/ ext / math-mode (4) - mkmf (24)
- pathname (51)
-
rake
/ packagetask (12) -
rdoc
/ text (12) -
rexml
/ parsers / sax2parser (60) -
rexml
/ streamlistener (12) -
rubygems
/ version (12) - set (23)
- tsort (70)
-
webrick
/ httpresponse (60) -
webrick
/ httpserver (24) - win32ole (36)
クラス
- Delegator (12)
-
Gem
:: Version (12) - Hash (48)
- IPAddr (24)
-
IRB
:: Context (4) - Method (24)
- Module (192)
- Object (120)
- Pathname (51)
- Proc (6)
-
RDoc
:: Options (24) -
REXML
:: Parsers :: SAX2Parser (60) -
Rake
:: PackageTask (12) - Range (50)
- Refinement (4)
- Set (32)
- TracePoint (12)
- UnboundMethod (12)
-
WEBrick
:: HTTPResponse (60) -
WEBrick
:: HTTPServer (24) - WIN32OLE (36)
モジュール
- GC (12)
- Kernel (24)
-
RDoc
:: Text (12) -
REXML
:: StreamListener (12) - TSort (70)
キーワード
- < (12)
- <=> (12)
- === (32)
-
_ getproperty (12) -
_ invoke (12) -
_ setproperty (12) - ancestors (12)
-
append
_ features (12) - bind (12)
- body= (12)
- chunked= (12)
-
const
_ defined? (12) -
const
_ get (12) -
const
_ source _ location (12) - constants (12)
-
content
_ length (12) -
content
_ length= (12) - cover? (14)
-
defined
_ class (12) -
each
_ child (24) -
each
_ entry (15) -
each
_ strongly _ connected _ component (23) -
each
_ strongly _ connected _ component _ from (23) - entitydecl (12)
- entries (12)
- eql? (12)
- extend (12)
-
garbage
_ collect (12) -
has
_ key? (12) -
import
_ methods (4) - include? (60)
-
include
_ line _ numbers (12) - included (12)
- inspect (12)
-
is
_ a? (12) - key? (12)
-
kind
_ of? (12) - listen (60)
- markup (12)
-
math
_ mode= (4) - member? (36)
- methods (12)
- mount (12)
-
package
_ files (12) -
prepend
_ features (12) -
private
_ instance _ methods (12) -
private
_ method _ defined? (12) -
private
_ methods (12) -
protected
_ method _ defined? (12) -
protected
_ methods (12) -
public
_ method _ defined? (12) -
public
_ methods (12) -
rdoc
_ include (12) -
respond
_ to? (12) -
respond
_ to _ missing? (24) -
ruby2
_ keywords (6) -
singleton
_ methods (12) -
strongly
_ connected _ components (12) -
to
_ s (24) -
try
_ cpp (24) - tsort (12)
-
virtual
_ host (12)
検索結果
先頭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...