1345件ヒット
[1301-1345件を表示]
(0.261秒)
ライブラリ
- ビルトイン (1345)
クラス
- Bignum (33)
- Complex (115)
- Enumerator (11)
-
Enumerator
:: Chain (6) -
Enumerator
:: Lazy (75) - Fixnum (30)
- Float (475)
- Integer (92)
- NilClass (11)
- Numeric (167)
- Object (11)
-
Process
:: Tms (44) - Random (33)
- Range (55)
- Rational (88)
- String (55)
- Time (33)
モジュール
- Enumerable (11)
キーワード
- % (28)
- * (28)
- ** (39)
- + (28)
- - (50)
- -@ (22)
-
/ (38) - < (11)
- <= (11)
- <=> (11)
- == (11)
- > (11)
- >= (11)
- abs (22)
- angle (22)
- arg (22)
- bsearch (22)
- ceil (15)
- coerce (11)
- cstime (11)
- cutime (11)
- denominator (22)
- div (17)
- divmod (11)
- each (22)
-
enum
_ for (22) - eql? (11)
- fdiv (50)
- finite? (27)
- floor (16)
- grep (11)
-
grep
_ v (9) - hash (11)
- hex (11)
- infinite? (27)
- inspect (22)
- lazy (22)
- magnitude (22)
- modulo (17)
- nan? (11)
- negative? (9)
-
next
_ float (10) - numerator (22)
- oct (11)
- phase (22)
- positive? (9)
- pow (22)
-
prev
_ float (10) - quo (22)
- rand (33)
- rationalize (22)
- remainder (3)
- round (23)
-
singleton
_ class (11) - size (28)
- step (84)
- stime (11)
-
to
_ enum (22) -
to
_ f (83) -
to
_ i (22) -
to
_ r (11) -
to
_ s (22) - truncate (15)
- utime (11)
- zero? (11)
検索結果
先頭5件
-
Range
# each {|item| . . . } -> self (8007.0) -
範囲内の要素に対して繰り返します。
...ッドを持たないクラスの範囲オブジェクトに対してこのメソッドを呼んだ場合に発生します。
//emlist[例][ruby]{
(10..15).each {|n| print n, ' ' }
# prints: 10 11 12 13 14 15
(2.5..5).each {|n| print n, ' ' }
# raises: TypeError: can't iterate from Float
//}... -
String
# hex -> Integer (8007.0) -
文字列に 16 進数で数値が表現されていると解釈して整数に変換します。 接頭辞 "0x", "0X" とアンダースコアは無視されます。 文字列が [_0-9a-fA-F] 以外の文字を含むときはその文字以降を無視します。
...# => 0
p "10z".hex # => 16
p "1_0".hex # => 16
p "".hex # => 0
//}
@see String#oct, String#to_i, String#to_f,
Kernel.#Integer, Kernel.#Float
このメソッドの逆に数値を文字列に変換するには
Kernel.#sprintf, String#%,
Integer#to_s
などを使ってください。... -
String
# oct -> Integer (8007.0) -
文字列を 8 進文字列であると解釈して、整数に変換します。
...{
p "-010".oct # => -8
p "-0x10".oct # => -16
p "-0b10".oct # => -2
p "1_0_1x".oct # => 65
//}
@see String#hex, String#to_i, String#to_f,
Kernel.#Integer, Kernel.#Float
逆に、数値を文字列に変換するにはKernel.#sprintf,
String#%, Integer#to_s を使用します。... -
String
# to _ i(base = 10) -> Integer (8007.0) -
文字列を 10 進数表現された整数であると解釈して、整数に変換します。
...する整数。0 か、2〜36 の整数。
@return 整数
このメソッドの逆に数値を文字列に変換するには、
Kernel.#sprintf, String#%, Integer#to_s
を使用します。
String#hex, String#oct, String#to_f,
Kernel.#Integer, Kernel.#Float
も参照してください。... -
Time
# -(sec) -> Time (8003.0) -
自身より sec 秒だけ前の時刻を返します。
自身より sec 秒だけ前の時刻を返します。
@param sec 実数を秒を単位として指定します。
//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 - 2592000 # => 2000-01-01 00:00:00 +0900
//}