2440件ヒット
[201-300件を表示]
(0.179秒)
ライブラリ
- ビルトイン (1852)
- bigdecimal (11)
-
cgi
/ core (22) - csv (11)
- fiddle (22)
- gdbm (11)
- ipaddr (11)
- matrix (55)
-
net
/ ftp (9) - openssl (99)
- ostruct (11)
- pathname (44)
- prime (22)
- rake (11)
-
rdoc
/ context (11) -
rexml
/ document (33) -
rinda
/ rinda (11) -
rubygems
/ requirement (33) -
rubygems
/ version (11) - sdbm (11)
- set (29)
- socket (55)
- strscan (11)
- uri (11)
- win32ole (22)
- zlib (11)
クラス
-
ARGF
. class (88) - Addrinfo (44)
- Array (339)
- BasicObject (11)
- BasicSocket (11)
- BigDecimal (11)
- Bignum (9)
- Binding (11)
- CGI (22)
-
CSV
:: Table (11) -
Enumerator
:: ArithmeticSequence (6) -
Enumerator
:: Lazy (118) - Exception (22)
-
Fiddle
:: Pointer (22) - Fixnum (3)
- Float (11)
- GDBM (11)
-
Gem
:: Requirement (33) -
Gem
:: Version (11) - Hash (67)
- IPAddr (11)
- Integer (36)
- Matrix (55)
- Method (11)
-
Net
:: FTP :: MLSxEntry (9) - Numeric (66)
- Object (33)
-
OpenSSL
:: BN (44) -
OpenSSL
:: PKey :: EC :: Group (22) -
OpenSSL
:: PKey :: EC :: Point (22) -
OpenSSL
:: SSL :: Session (11) - OpenStruct (11)
- Pathname (44)
- Prime (22)
- Proc (44)
-
RDoc
:: Context :: Section (11) -
REXML
:: Comment (11) -
REXML
:: Element (11) -
REXML
:: Instruction (11) - Random (33)
- Range (126)
- Rational (11)
- Regexp (11)
-
Rinda
:: DRbObjectTemplate (11) -
RubyVM
:: InstructionSequence (22) - SDBM (11)
- Set (29)
- String (286)
- StringScanner (11)
- Symbol (22)
-
URI
:: Generic (11) - UnboundMethod (44)
- WIN32OLE (11)
-
WIN32OLE
_ TYPE (11) -
Zlib
:: GzipReader (11)
モジュール
- Enumerable (422)
-
Rake
:: Cloneable (11)
キーワード
- % (11)
- +@ (9)
- -@ (9)
- === (102)
- =~ (11)
- [] (77)
-
_ _ id _ _ (11) - afamily (11)
- allbits? (7)
- assoc (22)
-
backtrace
_ locations (11) - call (11)
- chunk (22)
-
chunk
_ while (11) - clone (33)
- collect (11)
- count (66)
- crypt (11)
- dedup (2)
-
default
_ event _ sources (11) - delete (11)
-
delete
_ if (22) - detect (22)
- disasm (11)
- disassemble (11)
- div (11)
- divide (22)
- divmod (22)
- downcase (8)
- dump (11)
- dup (11)
- each (66)
-
each
_ line (44) - eigen (11)
- eigensystem (11)
- eql? (91)
- file? (9)
- filter (12)
- filter! (12)
- find (22)
-
find
_ all (22) -
find
_ index (66) - getpeername (11)
- hash (44)
- header (11)
- id2name (11)
- include? (45)
- index (33)
- intern (11)
- join (11)
-
keep
_ if (11) - lazy (22)
- lineno= (11)
-
local
_ variable _ defined? (11) - lup (11)
-
lup
_ decomposition (11) - map (11)
-
marshal
_ dump (11) -
marshal
_ load (11) - max (118)
- member? (16)
- min (118)
- minmax (10)
-
mod
_ inverse (11) - modulo (11)
- nobits? (7)
- none? (47)
-
ole
_ func _ methods (11) - one? (47)
- out (11)
- pack (19)
- partition (22)
- pfamily (11)
- protocol (11)
- rassoc (22)
- rectangular (11)
- reject (33)
- reject! (22)
- remainder (11)
- rindex (33)
-
root
_ node (11) -
satisfied
_ by? (11) - select (44)
- select! (22)
- sign (11)
- slice (66)
-
slice
_ after (20) -
slice
_ before (33) -
slice
_ when (10) - socktype (11)
- sort (22)
- split (17)
- string (11)
- sum (11)
-
to
_ s (11) -
to
_ sym (11) -
unicode
_ normalize! (10) - unpack (11)
- yield (11)
検索結果
先頭5件
-
REXML
:: Instruction # ==(other) -> bool (21101.0) -
other と self が同じ 処理命令である場合に真を返します。
...other と self が同じ 処理命令である場合に真を返します。
同じとは、 REXML::Instruction#target と REXML::Instruction#content
が一致することを意味します。
@param other 比較対象... -
Gem
:: Requirement # ===(version) -> bool (15301.0) -
引数 version が自身に含まれる全ての必要条件を満たす場合に true を返します。 そうでなければ、false を返します。
...引数 version が自身に含まれる全ての必要条件を満たす場合に true を返します。
そうでなければ、false を返します。
@param version Gem::Version のインスタンスを指定します。
//emlist[][ruby]{
req = Gem::Requirement.new("~> 3.2.1")
p req.satisfi......ed_by?(Gem::Version.new('3.2.9')) # => true
p req.satisfied_by?(Gem::Version.new('3.3.0')) # => false
//}... -
Range
# ===(obj) -> bool (15201.0) -
始端と終端の中に obj があるとき、true を返します。 そうでないとき、false を返します。
...false を返します。
Range#=== は主に case 式での比較に用いられます。
<=> メソッドによる演算により範囲内かどうかを判定するには Range#cover? を使用してください。
始端・終端・引数が数値であれば、 Range#cover? と同様の動き......クトを指定します。
//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:spec/control#case
@see Range#cover?......ange#=== は主に case 式での比較に用いられます。
//emlist[例][ruby]{
p (0...50) === 79 #=> false
p (60...80) === 79 #=> true
case 79
when 0...60 then puts "low"
when 60...80 then puts "medium" # => medium
when 80..100 then puts "high"
end
//}
2.5 以前は、単純に Rang......e#include? メソッドを内部で呼んでいました。
しかし、2.6 以降では、(文字列を除いて) Range#cover? と同様の処理をするように切り替わりました。
ただし、=== は、Range#cover? のように Range オブジェクトを引数にはとる設計はあ......include?(DateTime.now) #=> false
p (Date.today - 100...Date.today + 100).cover?(DateTime.now) #=> true
p (Date.today - 100...Date.today + 100) === DateTime.now #=> true
# 2.5 以前は、=== は、include? と同じく比較できず false を返していました。
//}
@see d:spec/con......include?(DateTime.now) #=> false
p (Date.today - 100...Date.today + 100).cover?(DateTime.now) #=> true
p (Date.today - 100...Date.today + 100) === DateTime.now #=> true
# 2.5 以前は、=== は、include? と同じく比較できず false を返していました。
//}
2.7 以降の ==... -
Rinda
:: DRbObjectTemplate # ===(ro) (15201.0) -
@todo
...@todo
This DRbObjectTemplate matches +ro+ if the remote object's drburi
and drbref are the same. +nil+ is used as a wildcard.... -
Regexp
# ===(string) -> bool (12301.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#===... -
Proc
# ===(*arg) -> () (12261.0) -
手続きオブジェクトを実行してその結果を返します。
...てください。
「===」は when の所に手続きを渡せるようにするためのものです。
//emlist[例][ruby]{
def sign(n)
case n
when lambda{|n| n > 0} then 1
when lambda{|n| n < 0} then -1
else 0
end
end
p sign(-4) #=> -1
p sign(0) #=> 0
p sign(7) #=> 1
//}
また......、以下のような syntactic sugar もあります。
//emlist[例][ruby]{
fib = lambda{|n|
case n
when 0 then 0
when 1 then 1
else
fib.(n - 2) + fib.(n - 1)
end
}
fib.(10) # => 55
//}
@param arg 手続きオブジェクトに与える引数を指定します。
@raise LocalJum... -
String
# ===(other) -> bool (12225.0) -
other が文字列の場合、String#eql? と同様に文字列の内容を比較します。
...other が文字列の場合、String#eql? と同様に文字列の内容を比較します。
other が文字列でない場合、
other.to_str が定義されていれば
other == self の結果を返します。(ただし、 other.to_str は実行されません。)
そうでなければ false......return true か false
//emlist[例][ruby]{
stringlike = Object.new
def stringlike.==(other)
"string" == other
end
p "string".eql?(stringlike) #=> false
p "string" == stringlike #=> false
def stringlike.to_str
raise
end
p "string".eql?(stringlike) #=> false
p "string" == stringlik......e #=> true
//}
@see String#eql?... -
Pathname
# ===(other) -> bool (12219.0) -
パス名を比較し、 other と同じなら真を返します。大文字小文字は区別されます。 other は Pathname オブジェクトでなければなりません。
...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
# false
# false
//}... -
Integer
# ===(other) -> bool (12213.0) -
比較演算子。数値として等しいか判定します。
...比較演算子。数値として等しいか判定します。
@param other 比較対象の数値
@return self と other が等しい場合 true を返します。
そうでなければ false を返します。
//emlist[][ruby]{
1 == 2 # => false
1 == 1.0 # => true
//}... -
Array
# find _ index -> Enumerator (12207.0) -
条件に一致する最初の要素の位置を返します。
...定された val と == で等しい最初の要素の位置を返します。
等しい要素がひとつもなかった場合は nil を返します。
//emlist[例][ruby]{
p [1, 0, 0, 1, 0].index(1) #=> 0
p [1, 0, 0, 0, 0].index(1) #=> 0
p [0, 0, 0, 0, 0].index(1) #=> nil
//}
ブロック......返します。
一つも真にならなかった場合は nil を返します。
//emlist[例][ruby]{
p [0, 1, 0, 1, 0].index {|v| v > 0} #=> 1
//}
引数、ブロックのどちらも与えられなかった場合は、
Enumerator のインスタンスを返します。
@see Array#rindex...