1241件ヒット
[1-100件を表示]
(0.183秒)
ライブラリ
- ビルトイン (658)
- bigdecimal (12)
- date (12)
- matrix (24)
- openssl (12)
- optparse (144)
- pathname (12)
- prime (24)
- psych (60)
-
rexml
/ parsers / sax2parser (60) -
rexml
/ streamlistener (96) -
rinda
/ tuplespace (12) - rubygems (12)
-
rubygems
/ platform (12) -
rubygems
/ requirement (36) - sdbm (24)
- set (15)
- timeout (16)
クラス
- Array (86)
- BigDecimal (12)
- Bignum (3)
- Date (12)
-
Gem
:: Platform (12) -
Gem
:: Requirement (36) - Hash (24)
- Integer (12)
- Method (32)
- Module (48)
- Object (48)
-
OpenSSL
:: BN (12) - OptionParser (144)
- Pathname (12)
- Prime (24)
-
Psych
:: Handler (60) -
REXML
:: Parsers :: SAX2Parser (60) - Regexp (48)
-
Rinda
:: TupleSpace (12) - SDBM (24)
- Set (24)
- String (180)
- Vector (24)
モジュール
- Enumerable (168)
- Kernel (28)
-
REXML
:: StreamListener (96)
キーワード
- % (12)
- * (24)
- <=> (12)
- =~ (24)
- [] (80)
- all? (45)
- any? (32)
- attlistdecl (12)
- call (16)
- cdata (12)
- clone (12)
- doctype (12)
- dup (12)
- each (24)
- elementdecl (12)
-
end
_ document (12) - gem (12)
- grep (24)
-
grep
_ v (24) - include? (8)
- instruction (12)
- invert (12)
- length (12)
- listen (60)
- match (24)
- member? (8)
-
module
_ function (36) - none? (15)
- notify (12)
- on (144)
- one? (45)
- pack (21)
-
satisfied
_ by? (12) - scalar (12)
- size (12)
- slice (72)
-
slice
_ after (24) -
slice
_ before (24) -
start
_ document (12) -
start
_ mapping (12) -
start
_ sequence (12) -
tag
_ end (12) -
tag
_ start (12) - timeout (16)
-
undef
_ method (12) - unpack (12)
- xmldecl (12)
検索結果
先頭5件
-
Object
# ===(other) -> bool (21319.0) -
case 式で使用されるメソッドです。d:spec/control#case も参照してください。
...pec/control#case も参照してください。
このメソッドは case 式での振る舞いを考慮して、
各クラスの性質に合わせて再定義すべきです。
デフォルトでは内部で Object#== を呼び出します。
when 節の式をレシーバーとして === を呼......ther 比較するオブジェクトです。
//emlist[][ruby]{
age = 12
# (0..2).===(12), (3..6).===(12), ... が実行される
result =
case age
when 0 .. 2
"baby"
when 3 .. 6
"little child"
when 7 .. 12
"child"
when 13 .. 18
"youth"
else
"adult"
end
puts result......it! #{arg}"
when String
"Instance of String class. But don't hit."
else
"unknown"
end
end
puts check([]) #=> unknown
puts check("mash-up in Ruby on Rails") #=> instance of String class. But not hit...
puts check("<Ruby's world>") #=> hit! <Ruby's world>
//}
@see Object#==, Range#===,... -
Date
# ===(other) -> bool (21302.0) -
同じ日なら真を返します。
...同じ日なら真を返します。
@param other 日付オブジェクト... -
Gem
:: Platform # ===(other) -> bool (21301.0) -
自身と other のプラットフォームが一致する場合に真を返します。 そうでない場合は、偽を返します。
...自身と other のプラットフォームが一致する場合に真を返します。
そうでない場合は、偽を返します。
プラットフォームが一致するとは、以下の条件を満たすことです。
* 同じ CPU であること、または、どちらか一方が '......universal' であること
* 同じ OS であること
* 同じバージョンであること、または、どちらか一方がバージョンを持たないこと
@param other 比較対象のオブジェクトです。... -
Method
# ===(*args) -> object (21301.0) -
メソッドオブジェクトに封入されているメソッドを起動します。
...せん。
@param args self に渡される引数。
@see spec/safelevel
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m[1] # => "foo called with arg 1"
m.call(2) # => "foo called with arg 2"
//}......f に渡される引数。
@see UnboundMethod#bind_call
@see spec/safelevel
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m[1] # => "foo called with arg 1"
m.call(2) # => "foo called with arg 2"
//}......@param args self に渡される引数。
@see UnboundMethod#bind_call
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m[1] # => "foo called with arg 1"
m.call(2) # => "foo called with arg 2"
//}... -
Gem
:: Requirement # ===(version) -> bool (21201.0) -
引数 version が自身に含まれる全ての必要条件を満たす場合に true を返します。 そうでなければ、false を返します。
...す場合に true を返します。
そうでなければ、false を返します。
@param version Gem::Version のインスタンスを指定します。
//emlist[][ruby]{
req = Gem::Requirement.new("~> 3.2.1")
p req.satisfied_by?(Gem::Version.new('3.2.9')) # => true
p req.satisfied_by?(Gem::... -
Set
# ===(o) -> bool (21201.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
//}... -
Regexp
# ===(string) -> bool (18337.0) -
文字列 string との正規表現マッチを行います。 マッチした場合は真を返します。
...文字列 string との正規表現マッチを行います。
マッチした場合は真を返します。
string が文字列でもシンボルでもない場合には false を返します。
このメソッドは主にcase文での比較に用いられます。
@param string マッチ対象......文字列
//emlist[例][ruby]{
a = "HELLO"
case a
when /\A[a-z]*\z/; puts "Lower case"
when /\A[A-Z]*\z/; puts "Upper case"
else; puts "Mixed case"
end
# => Upper case
/\A[a-z]*\z/ === "HELLO" # => false
/\A[A-Z]*\z/ === "HELLO" # => true
//}
@see Enumerable#grep, Object#===... -
Integer
# ===(other) -> bool (18301.0) -
比較演算子。数値として等しいか判定します。
...比較演算子。数値として等しいか判定します。
@param other 比較対象の数値
@return self と other が等しい場合 true を返します。
そうでなければ false を返します。
//emlist[][ruby]{
1 == 2 # => false
1 == 1.0 # => true
//}... -
Pathname
# ===(other) -> bool (18301.0) -
パス名を比較し、 other と同じなら真を返します。大文字小文字は区別されます。 other は Pathname オブジェクトでなければなりません。
...パス名を比較し、 other と同じなら真を返します。大文字小文字は区別されます。
other は Pathname オブジェクトでなければなりません。
パス名の比較は単純にパス文字列の比較によって行われるので、論理的に
同じパスで......param other 比較対象の Pathname オブジェクトを指定します。
//emlist[例][ruby]{
require 'pathname'
p Pathname.new("foo/bar") == Pathname.new("foo/bar")
p Pathname.new("foo/bar") == Pathname.new("foo//bar")
p Pathname.new("foo/../foo/bar") == Pathname.new("foo/bar")
# => true
#...