別のキーワード
ライブラリ
- ビルトイン (331)
- fiddle (24)
- ipaddr (24)
-
minitest
/ spec (1) -
minitest
/ unit (2) - monitor (12)
-
mutex
_ m (12) - objspace (12)
- openssl (60)
- pathname (12)
-
rdoc
/ context (12) -
rexml
/ parsers / sax2parser (60) -
rexml
/ sax2listener (12) -
rexml
/ streamlistener (12) -
rinda
/ tuplespace (12) - set (23)
- sync (6)
- tsort (23)
-
webrick
/ httpresponse (36) -
webrick
/ httpserver (12) - win32ole (48)
クラス
- Array (12)
- IPAddr (24)
- Method (24)
- Module (12)
- Object (109)
-
OpenSSL
:: ASN1 :: ObjectId (24) -
OpenSSL
:: X509 :: Extension (24) - Pathname (12)
-
RDoc
:: Context (12) -
REXML
:: Parsers :: SAX2Parser (60) - Range (55)
- Set (32)
- Symbol (12)
- Sync (6)
- UnboundMethod (12)
-
WEBrick
:: Cookie (24) -
WEBrick
:: HTTPResponse (36) -
WEBrick
:: HTTPServer (12) - WIN32OLE (36)
-
WIN32OLE
_ VARIANT (12)
モジュール
- Enumerable (24)
-
MiniTest
:: Assertions (2) - ObjectSpace (12)
- TSort (23)
オブジェクト
- ENV (48)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - === (32)
- BlockCaller (12)
- Closure (12)
- MonitorMixin (12)
-
Mutex
_ m (12) -
NEWS for Ruby 2
. 1 . 0 (12) -
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 2
. 6 . 0 (7) -
NEWS for Ruby 2
. 7 . 0 (6) -
NEWS for Ruby 3
. 1 . 0 (4) - OCSP (12)
- Range (12)
- Ruby用語集 (12)
- SAX2Listener (12)
- Set (3)
- StreamListener (12)
- TupleSpace (12)
-
_ getproperty (12) -
_ invoke (12) -
_ setproperty (12) -
add
_ include (12) -
all
_ symbols (12) -
assert
_ includes (1) -
assert
_ send (1) -
bigdecimal
/ math (12) - bind (12)
- body= (12)
- cgi (12)
-
content
_ length (12) -
content
_ length= (12) - cover? (19)
- drb (12)
-
drb
/ extservm (12) -
drb
/ gw (12) -
each
_ strongly _ connected _ component _ from (23) - entries (12)
- extend (12)
- fiddle (12)
-
has
_ key? (12) - include? (72)
- included (12)
- inspect (12)
-
irb
/ completion (12) -
is
_ a? (12) - key? (12)
-
kind
_ of? (12) - listen (60)
- member? (48)
- methods (12)
- mkmf (12)
-
must
_ include (1) - new (66)
- parse (12)
-
private
_ methods (12) -
protected
_ methods (12) -
public
_ methods (12) -
respond
_ to? (12) -
rexml
/ parsers / sax2parser (12) -
rexml
/ parsers / streamparser (12) -
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 4 feature (12) - set (9)
-
singleton
_ methods (12) -
to
_ s (12) -
trace
_ object _ allocations (12) -
virtual
_ host (12) - クラス/メソッドの定義 (12)
- 変数と定数 (12)
検索結果
先頭5件
-
オブジェクト (15109.0)
-
オブジェクト === オブジェクトとは
...オブジェクト
=== オブジェクトとは
Ruby で扱える全ての値はオブジェクトです。
Ruby のオブジェクトに対して可能な操作はメソッド呼び出しのみです。
あるオブジェクトが反応できるメソッドは、
そのオブジェクトが所属......ラスはオブジェクト生成時に決まり、その後は特異クラスの導入以外、所属クラスが変わることはありません。
またオブジェクトは、特定のクラスに対比して、その「インスタンス」とも呼ばれます。
オブジェクトの生成......ュール
include
ちょっと特殊でクラスではない。しかし機能は同じ。
=== メソッド
メソッドは実行することができます。その実行を開始することを通常「呼び出す」と言います。
また呼び出すときにはオブジェクトを渡す... -
RDoc
:: Context # add _ include(an _ include) -> () (6252.0) -
引数で指定した RDoc::Include オブジェクトを追加します。
...引数で指定した RDoc::Include オブジェクトを追加します。
@param an_include RDoc::Include オブジェクトを指定します。... -
Module
# included(class _ or _ module) -> () (6146.0) -
self が Module#include されたときに対象のクラスまたはモジュー ルを引数にしてインタプリタがこのメソッドを呼び出します。
...f が Module#include されたときに対象のクラスまたはモジュー
ルを引数にしてインタプリタがこのメソッドを呼び出します。
@param class_or_module Module#include を実行したオブジェクト
//emlist[例][ruby]{
module Foo
def self.included(mod)
p......"#{mod} include #{self}"
end
end
class Bar
include Foo
end
# => "Bar include Foo"
//}
@see Module#append_features... -
MiniTest
:: Assertions # assert _ includes(collection , object , message = nil) -> true (6140.0) -
与えられたコレクションにオブジェクトが含まれている場合、検査にパスしたことになります。
...与えられたコレクションにオブジェクトが含まれている場合、検査にパスしたことになります。
@param collection 任意のコレクションを指定します。
@param object 任意のオブジェクトを指定します。
@param message 検査に失敗した......結果を使用します。
@raise MiniTest::Assertion 第一引数のオブジェクトが include? メソッドを持たない場合に発生します。
与えられたコレクションにオブジェクトが含まれていない場合に発生します。... -
Object
# must _ include(object) -> true (6135.0) -
自身に与えられたオブジェクトが含まれている場合、検査にパスしたことになります。
...自身に与えられたオブジェクトが含まれている場合、検査にパスしたことになります。
@param object 任意のオブジェクトを指定します。
@raise MiniTest::Assertion 自身が include? メソッドを持たない場合に発生します。......自身に与えられたオブジェクトが含まれていない場合に発生します。
@see MiniTest::Assertions#assert_includes... -
Set
# include?(o) -> bool (6135.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
//}... -
Range
# include?(obj) -> bool (6131.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:... -
Array
# include?(val) -> bool (6119.0) -
配列が val と == で等しい要素を持つ時に真を返します。
...配列が val と == で等しい要素を持つ時に真を返します。
@param val オブジェクトを指定します。
//emlist[例][ruby]{
a = [ "a", "b", "c" ]
a.include?("b") #=> true
a.include?("z") #=> false
//}... -
Enumerable
# include?(val) -> bool (6119.0) -
val と == の関係にある要素を含むとき真を返します。
...val と == の関係にある要素を含むとき真を返します。
@param val 任意のオブジェクト
//emlist[例][ruby]{
[2, 4, 6].include? 2 #=> true
[2, 4, 6].include? 1 #=> false
[2, 4, 6].member? 2 #=> true
[2, 4, 6].member? 1 #=> false
//}... -
Set
# include?(o) -> bool (3135.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
//}......
オブジェクト o がその集合に属する場合に true を返します。
@param o オブジェクトを指定します。
//emlist[][ruby]{
set = Set['hello', 'world']
p set.include?('world') # => true
p set.include?('bye') # => false
//}... -
Range
# include?(obj) -> bool (3131.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:... -
IPAddr
# include?(ipaddr) -> bool (3123.0) -
与えられた IPAddr オブジェクトが自身の範囲に入っているかを判定します。
...与えられた IPAddr オブジェクトが自身の範囲に入っているかを判定します。
@param ipaddr 範囲に入っているかどうか調べる対象となる IPAddr オブジェクト。
また、数値や文字列も受け付けます。... -
ENV
. include?(key) -> bool (3107.0) -
key で指定される環境変数が存在する時、真を返します。
...される環境変数が存在する時、真を返します。
@param key 環境変数の名前を指定します。文字列で指定します。
文字列以外のオブジェクトを指定した場合は to_str メソッ
ドによる暗黙の型変換を試みます。...