ライブラリ
- ビルトイン (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件
-
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... -
IPAddr
# include?(ipaddr) -> bool (6202.0) -
与えられた IPAddr オブジェクトが自身の範囲に入っているかを判定します。
...与えられた IPAddr オブジェクトが自身の範囲に入っているかを判定します。
@param ipaddr 範囲に入っているかどうか調べる対象となる IPAddr オブジェクト。
また、数値や文字列も受け付けます。... -
Range
# include?(obj) -> bool (6156.0) -
obj が範囲内に含まれている時に true を返します。 そうでない場合は、false を返します。
...@param obj 比較対象のオブジェクトを指定します。
//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:sp... -
Method
# inspect -> String (6149.0) -
self を読みやすい文字列として返します。
...式の文字列を返します。
#<Method: klass1(klass2)#method> (形式1)
klass1 は、Method#inspect では、レシーバのクラス名、
UnboundMethod#inspect では、UnboundMethod オブジェクトの生成
元となったクラス/モジュール名です。
klass2......ッド名を表します。
//emlist[例][ruby]{
module Foo
def foo
"foo"
end
end
class Bar
include Foo
def bar
end
end
p Bar.new.method(:foo) # => #<Method: Bar(Foo)#foo>
p Bar.new.method(:bar) # => #<Method: Bar#bar>
//}
klass1 と klass2 が同じ場合は以下の......bj
def foo
end
end
p obj.method(:foo) # => #<Method: "".foo>
# クラスメソッド(クラスの特異メソッド)
class Foo
def Foo.foo
end
end
p Foo.method(:foo) # => #<Method: Foo.foo>
# スーパークラスのクラスメソッド
class Bar < Foo
end
p Bar.method(:foo)......の文字列を返します。
#<Method: klass1(klass2)#method(arg) foo.rb:2> (形式1)
klass1 は、Method#inspect では、レシーバのクラス名、
UnboundMethod#inspect では、UnboundMethod オブジェクトの生成
元となったクラス/モジュール名です。
klass2......付きません。
//emlist[例][ruby]{
module Foo
def foo
"foo"
end
end
class Bar
include Foo
def bar(a, b)
end
end
p Bar.new.method(:foo) # => #<Method: Bar(Foo)#foo() test.rb:2>
p Bar.new.method(:bar) # => #<Method: Bar#bar(a, b) test.rb:8>
//}
klass1 と klass2 が......end
end
p obj.method(:foo) # => #<Method: "".foo() foo.rb:4>
# クラスメソッド(クラスの特異メソッド)
class Foo
def Foo.foo
end
end
p Foo.method(:foo) # => #<Method: Foo.foo() foo.rb:11>
# スーパークラスのクラスメソッド
class Bar < Foo
end
p Bar.metho... -
Module
# included(class _ or _ module) -> () (6147.0) -
self が Module#include されたときに対象のクラスまたはモジュー ルを引数にしてインタプリタがこのメソッドを呼び出します。
...Module#include されたときに対象のクラスまたはモジュー
ルを引数にしてインタプリタがこのメソッドを呼び出します。
@param class_or_module Module#include を実行したオブジェクト
//emlist[例][ruby]{
module Foo
def self.included(mod)
p "#{mo......d} include #{self}"
end
end
class Bar
include Foo
end
# => "Bar include Foo"
//}
@see Module#append_features... -
Module
# include?(mod) -> bool (6132.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
//}... -
Set
# include?(o) -> bool (6126.0) -
オブジェクト o がその集合に属する場合に true を返します。
...オブジェクト o がその集合に属する場合に true を返します。
@param o オブジェクトを指定します。
//emlist[][ruby]{
require 'set'
set = Set['hello', 'world']
p set.include?('world') # => true
p set.include?('bye') # => false
//}... -
Module
# append _ features(module _ or _ class) -> self (6119.0) -
モジュール(あるいはクラス)に self の機能を追加します。
...ドは Module#include の実体であり、
include を Ruby で書くと以下のように定義できます。
//emlist[例][ruby]{
def include(*modules)
modules.reverse_each do |mod|
# append_features や included はプライベートメソッドなので
# 直接 mod.append_features(......self) などとは書けない
mod.__send__(:append_features, self)
mod.__send__(:included, self)
end
end
//}
@see Module#included... -
Module
# private _ method _ defined?(name , inherit=true) -> bool (6113.0) -
インスタンスメソッド name がモジュールに定義されており、 しかもその可視性が private であるときに true を返します。 そうでなければ false を返します。
...ており、
しかもその可視性が private であるときに true を返します。
そうでなければ false を返します。
@param name Symbol か String を指定します。
@param inherit 真を指定するとスーパークラスや include したモジュールで
定義......d_defined?, Module#public_method_defined?, Module#protected_method_defined?
//emlist[例][ruby]{
module A
def method1() end
end
class B
private
def method2() end
end
class C < B
include A
def method3() end
end
A.method_defined? :method1 #=> true
C.private_method_defi......ned? "method1" #=> false
C.private_method_defined? "method2" #=> true
C.private_method_defined? "method2", true #=> true
C.private_method_defined? "method2", false #=> false
C.method_defined? "method2" #=> false
//}...