4056件ヒット
[1-100件を表示]
(0.133秒)
クラス
-
ARGF
. class (11) - Array (294)
- BasicObject (66)
- Bignum (6)
- Class (11)
- Complex (44)
- Data (10)
- Dir (33)
-
Encoding
:: Converter (77) - Enumerator (80)
-
Enumerator
:: Chain (18) -
Enumerator
:: Lazy (120) -
Enumerator
:: Yielder (11) - Exception (11)
- Fiber (28)
- File (139)
- Fixnum (6)
- Float (49)
- Hash (100)
- IO (392)
- Integer (66)
- LocalJumpError (11)
- MatchData (11)
- Method (74)
- Module (245)
- Numeric (55)
- Object (220)
- Proc (61)
- Range (23)
- Rational (33)
- Refinement (3)
- Regexp (33)
-
RubyVM
:: InstructionSequence (11) - String (252)
- Struct (50)
- Symbol (42)
- Thread (49)
-
Thread
:: Queue (9) - Time (69)
- TracePoint (22)
- UnboundMethod (21)
モジュール
- Enumerable (319)
-
GC
:: Profiler (11) - Kernel (425)
- Math (22)
- ObjectSpace (44)
- Process (77)
-
Process
:: GID (33) -
Process
:: UID (33)
キーワード
- ! (11)
-
$ * (11) -
$ -d (11) -
$ DEBUG (11) - % (22)
- ** (50)
- + (11)
- << (12)
- === (18)
- >> (12)
- BasicObject (11)
- Comparable (11)
- Complex (22)
- DATA (11)
- EXXX (11)
- Fiber (11)
- Float (11)
- IO (11)
- InstructionSequence (11)
- Lazy (11)
- Location (11)
- Numeric (11)
- Rational (11)
- ScriptError (11)
- SignalException (11)
- Thread (11)
- ThreadError (11)
- TracePoint (11)
- [] (44)
-
_ _ id _ _ (11) -
_ _ send _ _ (22) - advise (11)
-
alias
_ method (11) - alive? (3)
- append (7)
- arity (33)
- at (36)
- attr (11)
-
attr
_ accessor (11) -
attr
_ reader (11) -
attr
_ writer (11) - backtrace (11)
-
bind
_ call (10) - binmode (11)
- bsearch (44)
- call (22)
- caller (33)
- capitalize (16)
- capitalize! (8)
- chain (6)
- chmod (11)
- chomp (11)
- chop (11)
- chown (11)
- chunk (11)
-
class
_ exec (11) - close (9)
- collect (44)
- collect! (22)
-
collect
_ concat (33) -
compile
_ option= (11) - concat (16)
- convert (11)
- count (11)
- define (4)
- delete (22)
- delete! (11)
-
deprecate
_ constant (9) - difference (6)
- div (11)
- divmod (22)
- downcase (16)
- downcase! (8)
- each (56)
-
each
_ object (44) -
each
_ with _ index (22) -
each
_ with _ object (22) - eid= (22)
- encode (33)
-
end
_ with? (16) - entries (11)
-
enum
_ for (44) - except (6)
- exec (55)
- extend (11)
-
filter
_ map (15) -
flat
_ map (33) - flock (11)
- fnmatch (11)
- fnmatch? (11)
-
for
_ fd (11) - force (11)
- fork (11)
- format (11)
- frexp (11)
- ftype (11)
- gamma (11)
- glob (22)
-
grant
_ privilege (22) -
grep
_ v (22) - groups (11)
- gsub (33)
- hash (11)
-
import
_ methods (3) - include (22)
- initialize (11)
- insert (11)
- inspect (11)
-
instance
_ exec (11) - intersection (5)
- join (11)
- kill (11)
- lazy (11)
- lchmod (11)
- lchown (11)
- lutime (7)
- map (44)
- map! (22)
- match (22)
-
max
_ by (44) - merge (12)
- merge! (16)
-
method
_ missing (11) -
module
_ exec (11) -
module
_ function (11) - modulo (11)
- new (145)
- open (22)
- overlap? (1)
- p (11)
- pack (19)
- parameters (22)
- pipe (44)
- popen (154)
- pow (22)
- pp (7)
- prepend (26)
-
primitive
_ convert (44) - print (11)
- printf (22)
- private (22)
-
private
_ class _ method (11) -
private
_ constant (11) - product (22)
- protected (11)
- public (22)
-
public
_ class _ method (11) -
public
_ constant (11) -
public
_ send (22) - push (11)
- puts (11)
-
raw
_ data (11) - read (44)
- readpartial (11)
- reason (11)
- refine (11)
- remainder (11)
-
remove
_ method (11) -
report
_ on _ exception (8) -
report
_ on _ exception= (8) -
respond
_ to _ missing? (11) - resume (11)
- round (27)
-
ruby2
_ keywords (10) - seek (11)
- send (22)
-
set
_ encoding (22) - setpriority (11)
- setrlimit (22)
-
sid
_ available? (22) - slice (13)
- spawn (55)
- sprintf (11)
- squeeze (11)
- squeeze! (11)
- start (11)
-
start
_ with? (12) - strftime (11)
- sub (22)
- sum (38)
- swapcase (16)
- swapcase! (8)
- syscall (11)
- sysread (11)
- sysseek (11)
- system (44)
- tap (11)
-
to
_ a (22) -
to
_ ary (11) -
to
_ c (11) -
to
_ enum (44) -
to
_ f (22) -
to
_ h (25) -
to
_ hash (11) -
to
_ int (11) -
to
_ io (11) -
to
_ r (11) -
to
_ regexp (11) -
to
_ s (11) -
to
_ str (11) - trace (11)
- transfer (3)
-
transform
_ values (16) -
transform
_ values! (16) -
undef
_ method (11) - union (17)
- unlink (11)
- unpack (11)
- unshift (11)
- upcase (16)
- upcase! (8)
- update (16)
- using (22)
- utime (11)
-
values
_ at (55) - warn (11)
-
with
_ index (16) -
with
_ object (11) - write (29)
- yield (33)
- zip (55)
検索結果
先頭5件
-
Integer
# *(other) -> Numeric (29308.0) -
算術演算子。積を計算します。
...算術演算子。積を計算します。
@param other 二項演算の右側の引数(対象)
@return 計算結果
//emlist[][ruby]{
2 * 3 # => 6
//}... -
Complex
# *(other) -> Complex (29220.0) -
積を計算します。
...積を計算します。
@param other 自身に掛ける数
//emlist[例][ruby]{
Complex(1, 2) * 2 # => (2+4i)
Complex(1, 2) * Complex(2, 3) # => (-4+7i)
Complex(1, 2) * Rational(1, 2) # => ((1/2)+(1/1)*i)
//}... -
Rational
# *(other) -> Rational | Float (26226.0) -
積を計算します。
...します。
@param other 自身に掛ける数
other に Float を指定した場合は、計算結果を Float で返しま
す。
//emlist[例][ruby]{
r = Rational(3, 4)
r * 2 # => (3/2)
r * 4 # => (3/1)
r * 0.5 # => 0.375
r * Rational(1, 2) # => (3... -
String
# *(times) -> String (26220.0) -
文字列の内容を times 回だけ繰り返した新しい文字列を作成して返します。
...容を times 回だけ繰り返した新しい文字列を作成して返します。
@param times 整数
@return self を times 回繰り返した新しい文字列
@raise ArgumentError 引数に負数を指定したときに発生します。
//emlist[例][ruby]{
p "str" * 3 # => "......strstrstr"
str = "abc"
p str * 4 # => "abcabcabcabc"
p str * 0 # => ""
p str # => "abc" (変化なし)
//}... -
Array
# *(sep) -> String (26209.0) -
指定された sep を間にはさんで連結した文字列を生成して返します。Array#join(sep) と同じ動作をします。
...指定された sep を間にはさんで連結した文字列を生成して返します。Array#join(sep) と同じ動作をします。
@param sep 文字列を指定します。
文字列以外のオブジェクトを指定した場合は to_str メソッドによ
る暗......黙の型変換を試みます。
//emlist[例][ruby]{
p [1,2,3] * ","
# => "1,2,3"
//}
@see Array#join... -
Array
# *(times) -> Array (26209.0) -
配列の内容を times 回 繰り返した新しい配列を作成して返します。 値はコピーされないことに注意してください。
...配列の内容を times 回 繰り返した新しい配列を作成して返します。
値はコピーされないことに注意してください。
@param times 繰り返したい回数を整数で指定します。
整数以外のオブジェクトを指定した場合は to_in......ます。
@raise TypeError 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。
@raise ArgumentError 引数に負の数を指定した場合に発生します。
//emlist[例][ruby]{
p [1, 2, 3] * 3 #=> [1, 2, 3... -
Float
# *(other) -> Float (26208.0) -
算術演算子。積を計算します。
...算術演算子。積を計算します。
@param other 二項演算の右側の引数(対象)
//emlist[例][ruby]{
# 積
2.4 * 3 # => 7.2
//}... -
Bignum
# *(other) -> Fixnum | Bignum | Float (26202.0) -
算術演算子。積を計算します。
...算術演算子。積を計算します。
@param other 二項演算の右側の引数(対象)
@return 計算結果... -
Fixnum
# *(other) -> Fixnum | Bignum | Float (26202.0) -
算術演算子。積を計算します。
...算術演算子。積を計算します。
@param other 二項演算の右側の引数(対象)
@return 計算結果... -
Enumerator
:: Lazy # enum _ for(method = :each , *args) {|*args| block} -> Enumerator :: Lazy (17412.0) -
Object#to_enum と同じですが、Enumerator::Lazy を返します。
...Object#to_enum と同じですが、Enumerator::Lazy を返します。
to_enum は「ブロック付きで呼ぶとループを実行し、ブロックを省略した場合は
Enumerator を返す」ようなメソッドを定義するときによく使われます。
このときに lazy 性が......o_enum は
素のEnumerator ではなく Enumerator::Lazy を返すようになっています。
//emlist[例][ruby]{
module Enumerable
# 要素をn回ずつ繰り返すメソッド
# 例:[1,2,3].repeat(2) #=> [1,1,2,2,3,3]
def repeat(n)
raise ArgumentError if n < 0
if block_given......do |*val|
n.times { yield *val }
end
else
to_enum(:repeat, n)
end
end
end
r = 1..10
p r.map{|n| n**2}.repeat(2).first(5)
#=> [1, 1, 4, 4, 9]
r = 1..Float::INFINITY
p r.lazy.map{|n| n**2}.repeat(2).first(5)
#=> [1, 1, 4, 4, 9]
# Lazy#to_enum のおかげで、repeat... -
Enumerator
:: Lazy # to _ enum(method = :each , *args) {|*args| block} -> Enumerator :: Lazy (17412.0) -
Object#to_enum と同じですが、Enumerator::Lazy を返します。
...Object#to_enum と同じですが、Enumerator::Lazy を返します。
to_enum は「ブロック付きで呼ぶとループを実行し、ブロックを省略した場合は
Enumerator を返す」ようなメソッドを定義するときによく使われます。
このときに lazy 性が......o_enum は
素のEnumerator ではなく Enumerator::Lazy を返すようになっています。
//emlist[例][ruby]{
module Enumerable
# 要素をn回ずつ繰り返すメソッド
# 例:[1,2,3].repeat(2) #=> [1,1,2,2,3,3]
def repeat(n)
raise ArgumentError if n < 0
if block_given......do |*val|
n.times { yield *val }
end
else
to_enum(:repeat, n)
end
end
end
r = 1..10
p r.map{|n| n**2}.repeat(2).first(5)
#=> [1, 1, 4, 4, 9]
r = 1..Float::INFINITY
p r.lazy.map{|n| n**2}.repeat(2).first(5)
#=> [1, 1, 4, 4, 9]
# Lazy#to_enum のおかげで、repeat...