5822件ヒット
[1-100件を表示]
(0.062秒)
別のキーワード
クラス
-
ARGF
. class (36) - Array (565)
- Binding (7)
- Class (12)
- Complex (120)
- Data (33)
- Dir (43)
- Encoding (24)
-
Encoding
:: Converter (72) - Enumerator (187)
-
Enumerator
:: Lazy (386) -
Enumerator
:: Yielder (30) - Exception (12)
- File (72)
-
File
:: Stat (504) - Float (519)
- Hash (267)
- IO (174)
- Integer (132)
- MatchData (290)
- Method (12)
- Module (264)
- NilClass (48)
- Numeric (176)
- Object (87)
- Proc (18)
- Random (36)
- Range (77)
- Rational (309)
- Regexp (33)
-
RubyVM
:: InstructionSequence (34) - Set (6)
- String (413)
- Struct (55)
- Symbol (9)
- Thread (24)
-
Thread
:: Backtrace :: Location (84) - Time (72)
- TracePoint (12)
- UnboundMethod (12)
モジュール
- Enumerable (544)
- GC (12)
キーワード
- % (26)
- * (24)
- ** (24)
- + (31)
- -@ (21)
-
/ (24) - < (12)
- << (12)
- <= (12)
- <=> (36)
- == (39)
- === (6)
- > (12)
- >= (12)
- [] (96)
- abs (21)
-
absolute
_ path (24) - all? (15)
- allocate (12)
- angle (36)
- any? (16)
-
append
_ features (12) - arg (36)
-
ascii
_ compatible? (12) - atime (24)
- attr (36)
-
attr
_ accessor (12) -
attr
_ reader (12) -
attr
_ writer (12) - autoload (12)
-
backtrace
_ locations (36) -
base
_ label (12) - begin (12)
- birthtime (12)
- blksize (12)
- blockdev? (12)
- blocks (12)
- bsearch (24)
-
bsearch
_ index (10) - bytebegin (2)
- byteend (2)
- byteindex (3)
- byteoffset (6)
- byterindex (3)
- captures (12)
- ceil (28)
- chain (7)
- chardev? (12)
- chunk (36)
-
chunk
_ while (12) - coerce (12)
- collect (36)
- collect! (12)
-
collect
_ concat (36) - combination (24)
- concat (42)
- conjugate (24)
-
const
_ source _ location (12) - convpath (12)
- ctime (12)
- cycle (24)
- deconstruct (5)
-
deconstruct
_ keys (5) -
delete
_ at (12) -
delete
_ if (24) - denominator (48)
-
deprecate
_ constant (12) -
destination
_ encoding (12) - detect (12)
- dev (12)
-
dev
_ major (12) -
dev
_ minor (12) - directory? (12)
- divmod (12)
- downto (12)
- drop (12)
-
drop
_ while (36) - each (144)
-
each
_ byte (24) -
each
_ char (24) -
each
_ child (7) -
each
_ codepoint (36) -
each
_ cons (12) -
each
_ entry (12) -
each
_ grapheme _ cluster (8) -
each
_ index (12) -
each
_ key (12) -
each
_ line (48) -
each
_ pair (24) -
each
_ slice (12) -
each
_ value (12) -
each
_ with _ index (12) -
each
_ with _ object (12) - eager (6)
- end (12)
-
enum
_ for (48) - eql? (27)
- executable? (12)
-
executable
_ real? (12) - fdatasync (12)
- fdiv (24)
- feed (12)
-
fetch
_ values (22) - file? (12)
- filter (35)
- filter! (14)
-
filter
_ map (12) - find (12)
-
find
_ all (24) -
find
_ index (24) - finite? (12)
-
flat
_ map (36) - flatten (27)
- flatten! (15)
- flock (12)
- floor (29)
- force (12)
- ftype (12)
-
garbage
_ collect (12) - gid (12)
- grep (36)
-
grep
_ v (34) -
group
_ by (12) - grpowned? (12)
- gsub (48)
- gsub! (48)
- hash (15)
- index (31)
- infinite? (12)
- ino (12)
- inspect (51)
- isatty (12)
-
keep
_ if (24) - key (12)
- label (12)
- lazy (24)
- length (12)
- lineno (12)
- lstat (12)
- magnitude (21)
- map (36)
- map! (12)
- match (48)
- match? (27)
-
max
_ by (24) - members (3)
-
min
_ by (24) -
minmax
_ by (12) - mode (12)
- modulo (12)
- mtime (12)
-
named
_ captures (12) - names (12)
- nan? (12)
- negative? (29)
- next (12)
-
next
_ float (11) -
next
_ values (12) - nlink (12)
- none? (15)
- numerator (48)
- offset (24)
- one? (15)
- owned? (12)
- pack (21)
- partition (12)
- path (75)
- peek (12)
-
peek
_ values (12) - permutation (24)
- phase (36)
- pipe? (12)
- positive? (19)
-
post
_ match (12) -
pre
_ match (12) -
prepend
_ features (12) -
prev
_ float (11) -
primitive
_ convert (48) - private (48)
-
private
_ class _ method (24) -
private
_ constant (12) -
private
_ instance _ methods (12) -
private
_ method _ defined? (12) - quo (24)
- rand (36)
- rationalize (108)
- rdev (12)
-
rdev
_ major (12) -
rdev
_ minor (12) - readable? (12)
-
readable
_ real? (12) - regexp (12)
- reject (48)
- reject! (24)
-
remove
_ const (12) - reopen (24)
-
repeated
_ combination (24) -
repeated
_ permutation (24) - replicate (12)
-
respond
_ to _ missing? (12) -
reverse
_ each (26) - rewind (12)
- rindex (24)
- rotate (12)
- rotate! (12)
- round (37)
-
ruby2
_ keywords (18) - saturday? (12)
- scan (24)
- select (60)
- select! (24)
- setgid? (12)
- setuid? (12)
- size (48)
- size? (12)
-
slice
_ after (46) -
slice
_ before (60) -
slice
_ when (23) - socket? (12)
-
sort
_ by (12) -
sort
_ by! (12) -
source
_ location (43) - stat (12)
- step (100)
- sticky? (12)
- strftime (12)
- string (12)
- sub (36)
- sub! (36)
- subsec (12)
- symlink? (12)
- take (12)
-
take
_ while (48) - then (7)
- times (12)
-
to
_ a (12) -
to
_ binary (10) -
to
_ enum (48) -
to
_ f (84) -
to
_ h (6) -
to
_ i (24) -
to
_ path (27) -
to
_ proc (6) -
to
_ r (84) -
to
_ regexp (12) -
to
_ s (51) - tr (12)
-
tr
_ s (12) -
tr
_ s! (12) -
transform
_ keys (8) -
transform
_ keys! (8) -
transform
_ values (9) -
transform
_ values! (9) - truncate (60)
- tty? (12)
- uid (12)
- unpack (12)
- unpack1 (9)
- update (24)
- upto (12)
-
values
_ at (48) - with (3)
-
with
_ index (36) -
with
_ object (24) -
world
_ readable? (12) -
world
_ writable? (12) - writable? (12)
-
writable
_ real? (12) - yield (12)
-
yield
_ self (8) - zero? (24)
- zip (24)
検索結果
先頭5件
-
Rational
# -(other) -> Rational | Float (21321.0) -
差を計算します。
...差を計算します。
@param other 自身から引く数
other に Float を指定した場合は、計算結果を Float で返しま
す。
//emlist[例][ruby]{
r = Rational(3, 4)
r - 1 # => (-1/4)
r - 0.5 # => 0.25
//}... -
Float
# -(other) -> Float (21215.0) -
算術演算子。差を計算します。
...算術演算子。差を計算します。
@param other 二項演算の右側の引数(対象)
//emlist[例][ruby]{
# 差
4.5 - 1.3 # => 3.2
//}... -
Time
# -(time) -> Float (18247.0) -
自身と time との時刻の差を Float で返します。単位は秒です。
...の差を Float で返します。単位は秒です。
@param time 自身との差を算出したい Time オブジェクトを指定します。
//emlist[][ruby]{
p t = Time.local(2000) # => 2000-01-01 00:00:00 +0900
p t2 = t + 2592000 # => 2000-01-31 00:00:00 +0900
p t2 - t... -
Array
# at(nth) -> object | nil (15222.0) -
nth 番目の要素を返します。nth 番目の要素が存在しない時には nil を返します。
...要素が 0 番目になります。nth の値が負の時には末尾から
のインデックスと見倣します。末尾の要素が -1 番目になります。
整数以外のオブジェクトを指定した場合は to_int メソッドによる
暗黙の型......みます。
@raise TypeError 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。
//emlist[例][ruby]{
a = [ "a", "b", "c", "d", "e" ]
a[0] #=> "a"
a[1] #=> "b"
a[-1] #=> "e"
a[-2] #=> "d"
a[10] #=> nil
//}... -
Array
# repeated _ combination(n) -> Enumerator (12415.0) -
サイズ n の重複組み合わせをすべて生成し、それを引数としてブロックを実行 します。
...得られる組み合わせの順序は保証されません。ブロックなしで呼び出されると、
組み合わせを生成する Enumerator オブジェクトを返します。
@param n 生成される配列のサイズを整数で指定します。
整数以外のオブジェ......指定した場合に発生します。
//emlist[例][ruby]{
a = [1, 2, 3]
a.repeated_combination(1).to_a #=> [[1], [2], [3]]
a.repeated_combination(2).to_a #=> [[1,1],[1,2],[1,3],[2,2],[2,3],[3,3]]
a.repeated_combination(3).to_a #=> [[1,1,1],[1,1,2],[1,1,3],[1,2,2],[1,2,3],......3,3]]
a.repeated_combination(4).to_a #=> [[1,1,1,1],[1,1,1,2],[1,1,1,3],[1,1,2,2],[1,1,2,3],
# [1,1,3,3],[1,2,2,2],[1,2,2,3],[1,2,3,3],[1,3,3,3],
# [2,2,2,2],[2,2,2,3],[2,2,3,3],[2,3,3,3],[3,3,3,3]]
a.repeated_combination(0).to_a... -
Array
# repeated _ permutation(n) -> Enumerator (12415.0) -
サイズ n の重複順列をすべて生成し,それを引数としてブロックを実行します。
...実行します。
得られる順列の順序は保証されません。ブロックなしで呼び出されると, 順列
を生成する Enumerator オブジェクトを返します。
@param n 生成する配列のサイズを整数で指定します。
整数以外のオブジェ......t[例][ruby]{
a = [1, 2]
a.repeated_permutation(1).to_a #=> [[1], [2]]
a.repeated_permutation(2).to_a #=> [[1,1],[1,2],[2,1],[2,2]]
a.repeated_permutation(3).to_a #=> [[1,1,1],[1,1,2],[1,2,1],[1,2,2],
# [2,1,1],[2,1,2],[2,2,1],[2,2,2]]
a.repeated_permutation(0).......to_a #=> [[]] # one permutation of length 0
//}
ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2]
result = []
a.repeated_permutation(3) {|e| result << e} # => [1,2]
result #=... -
Array
# repeated _ combination(n) { |c| . . . } -> self (12315.0) -
サイズ n の重複組み合わせをすべて生成し、それを引数としてブロックを実行 します。
...得られる組み合わせの順序は保証されません。ブロックなしで呼び出されると、
組み合わせを生成する Enumerator オブジェクトを返します。
@param n 生成される配列のサイズを整数で指定します。
整数以外のオブジェ......指定した場合に発生します。
//emlist[例][ruby]{
a = [1, 2, 3]
a.repeated_combination(1).to_a #=> [[1], [2], [3]]
a.repeated_combination(2).to_a #=> [[1,1],[1,2],[1,3],[2,2],[2,3],[3,3]]
a.repeated_combination(3).to_a #=> [[1,1,1],[1,1,2],[1,1,3],[1,2,2],[1,2,3],......3,3]]
a.repeated_combination(4).to_a #=> [[1,1,1,1],[1,1,1,2],[1,1,1,3],[1,1,2,2],[1,1,2,3],
# [1,1,3,3],[1,2,2,2],[1,2,2,3],[1,2,3,3],[1,3,3,3],
# [2,2,2,2],[2,2,2,3],[2,2,3,3],[2,3,3,3],[3,3,3,3]]
a.repeated_combination(0).to_a... -
Array
# repeated _ permutation(n) { |p| . . . } -> self (12315.0) -
サイズ n の重複順列をすべて生成し,それを引数としてブロックを実行します。
...実行します。
得られる順列の順序は保証されません。ブロックなしで呼び出されると, 順列
を生成する Enumerator オブジェクトを返します。
@param n 生成する配列のサイズを整数で指定します。
整数以外のオブジェ......t[例][ruby]{
a = [1, 2]
a.repeated_permutation(1).to_a #=> [[1], [2]]
a.repeated_permutation(2).to_a #=> [[1,1],[1,2],[2,1],[2,2]]
a.repeated_permutation(3).to_a #=> [[1,1,1],[1,1,2],[1,2,1],[1,2,2],
# [2,1,1],[2,1,2],[2,2,1],[2,2,2]]
a.repeated_permutation(0).......to_a #=> [[]] # one permutation of length 0
//}
ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2]
result = []
a.repeated_permutation(3) {|e| result << e} # => [1,2]
result #=... -
MatchData
# values _ at(*index) -> [String] (12264.0) -
正規表現中の n 番目の括弧にマッチした部分文字列の配列を返します。
...mlist[例][ruby]{
m = /(foo)(bar)(baz)/.match("foobarbaz")
# same as m.to_a.values_at(...)
p m.values_at(0, 1, 2, 3, 4) # => ["foobarbaz", "foo", "bar", "baz", nil]
p m.values_at(-1, -2, -3, -4, -5) # => ["baz", "bar", "foo", nil, nil]
m = /(?<a>\d+) *(?<op>[+\-*\/]) *(?<b>\d+)/.match("1 + 2")......m.to_a # => ["1 + 2", "1", "+", "2"]
m.values_at(:a, :b, :op) # => ["1", "2", "+"]
//}
@see Array#values_at, Array#[]...