939件ヒット
[1-100件を表示]
(0.042秒)
種類
- 定数 (420)
- インスタンスメソッド (365)
- モジュール関数 (83)
- 特異メソッド (60)
- クラス (11)
クラス
- Array (18)
- Binding (6)
-
Encoding
:: Converter (44) - IO (33)
- Integer (36)
- Method (11)
- Module (5)
- Object (17)
- Proc (11)
- Rational (88)
- Regexp (33)
-
RubyVM
:: InstructionSequence (11) - SignalException (11)
- String (18)
-
Thread
:: Backtrace :: Location (11) - Time (46)
- UnboundMethod (11)
モジュール
- Enumerable (21)
-
File
:: Constants (304) - GC (11)
- Kernel (72)
- Marshal (22)
- Process (88)
キーワード
- APPEND (11)
- BINARY (11)
-
CLOCK
_ MONOTONIC (11) -
CLOCK
_ MONOTONIC _ COARSE (11) -
CLOCK
_ MONOTONIC _ FAST (11) -
CLOCK
_ MONOTONIC _ PRECISE (11) -
CLOCK
_ MONOTONIC _ RAW (11) -
CLOCK
_ MONOTONIC _ RAW _ APPROX (11) -
CLOCK
_ SECOND (11) - CREAT (11)
- DIRECT (11)
- DSYNC (11)
- EXCL (11)
-
FNM
_ CASEFOLD (11) -
FNM
_ DOTMATCH (11) -
FNM
_ EXTGLOB (11) -
FNM
_ NOESCAPE (11) -
FNM
_ PATHNAME (11) -
FNM
_ SYSCASE (11) -
INTERNAL
_ CONSTANTS (11) -
LOCK
_ EX (11) -
LOCK
_ NB (11) -
LOCK
_ SH (11) -
LOCK
_ UN (11) -
MAJOR
_ VERSION (11) -
MINOR
_ VERSION (11) - NOATIME (11)
- NOCTTY (11)
- NOFOLLOW (11)
- NONBLOCK (11)
- RDONLY (11)
- RDWR (11)
- RSYNC (11)
-
RUBY
_ REVISION (6) - Rational (22)
-
SHARE
_ DELETE (9) - SYNC (11)
- TMPFILE (9)
- TRUNC (11)
- WRONLY (11)
- at (13)
- byteindex (2)
- ceil (11)
-
clock
_ gettime (11) - compile (11)
- concat (16)
-
const
_ source _ location (5) - denominator (11)
-
first
_ lineno (11) - floor (11)
- hash (11)
- lineno (11)
- mon (11)
- month (11)
- new (11)
- numerator (11)
- one? (39)
-
primitive
_ convert (44) - rationalize (22)
- round (11)
- signo (11)
-
singleton
_ class (11) -
source
_ location (39) - spawn (44)
- subsec (11)
- syscall (11)
-
to
_ i (11) -
to
_ r (11) - truncate (11)
-
try
_ convert (3) - write (22)
-
write
_ nonblock (11)
検索結果
先頭5件
-
Integer
. try _ convert(obj) -> Integer | nil (27255.0) -
obj を Integer に変換しようと試みます。変換には Object#to_int メソッドが使われます。
...obj を Integer に変換しようと試みます。変換には Object#to_int
メソッドが使われます。
Integer ならそのままobjを返します。
そうでなければ obj.to_int の結果を返すか、nil が返されます。
@param obj 変換する任意のオブジェクト......@return Integer または nil
@raise TypeError to_int が Integer を返さなかった場合に発生します。
//emlist[例][ruby]{
Integer.try_convert(1) # => 1
Integer.try_convert(1.25) # => 1
Integer.try_convert([]) # => nil
//}... -
Integer
# rationalize -> Rational (27202.0) -
自身を Rational に変換します。
...自身を Rational に変換します。
@param eps 許容する誤差
引数 eps は常に無視されます。
//emlist[][ruby]{
2.rationalize # => (2/1)
2.rationalize(100) # => (2/1)
2.rationalize(0.1) # => (2/1)
//}... -
Integer
# rationalize(eps) -> Rational (27202.0) -
自身を Rational に変換します。
...自身を Rational に変換します。
@param eps 許容する誤差
引数 eps は常に無視されます。
//emlist[][ruby]{
2.rationalize # => (2/1)
2.rationalize(100) # => (2/1)
2.rationalize(0.1) # => (2/1)
//}... -
Integer
# to _ r -> Rational (21102.0) -
自身を Rational に変換します。
...自身を Rational に変換します。
//emlist[][ruby]{
1.to_r # => (1/1)
(1<<64).to_r # => (18446744073709551616/1)
//}... -
Kernel
. # Integer(arg , base = 0 , exception: true) -> Integer | nil (18460.0) -
引数を整数(Fixnum,Bignum)に変換した結果を返します。
...フィクスは、0b
(2 進数)、0 (8 進数)、0o (8 進数)、0d (10 進数)、0x (16 進
数) です。
@param exception false を指定すると、変換できなかった場合、
例外を発生する代わりに nil を返します。
@raise Argumen......数(Integerのサブクラス)を返さなかった場合に発生します。
@raise TypeError 引数に nil を指定した場合に発生します。
//emlist[例][ruby]{
p Integer(4) #=> 4
p Integer(4_000) #=> 4000
p Integer(9.88) #=> 9
p Integer(nil) # can't convert......nil into Integer (TypeError)
p Integer(Object.new) # cannot convert Object into Integer (TypeError)
p Integer("10") #=> 10
p Integer("10", 2) #=> 2
p Integer("0d10") #=> 10
p Integer("010") #=> 8
p Integer("0o10") #=> 8
p Integer("0x10") #=> 16
p Integer("0b10") #=> 2... -
Module
# const _ source _ location(name , inherited = true) -> [String , Integer] (12303.0) -
name で指定した定数の定義を含むソースコードのファイル名と行番号を配列で返します。
...B.const_source_location('C4') # => ["test.rb", 12]
p B.const_source_location('C3') # => ["test.rb", 7]
p B.const_source_location('C1') # => ["test.rb", 2]
p B.const_source_location('C3', false) # => nil -- include したモジュールは検索しない
p A.const_......source_location('C2') # => ["test.rb", 16] -- 最後に定義された位置を返す
p Object.const_source_location('B') # => ["test.rb", 10] -- Object はトップレベルの定数を検索する
p Object.const_source_location('A') # => ["test.rb", 1] -- クラスが再定......を返す
p B.const_source_location('A') # => ["test.rb", 1] -- Object を継承している為
p M.const_source_location('A') # => ["test.rb", 1] -- Object は継承していないが追加で modules をチェックする
p Object.const_source_location('A::C1') # => ["t... -
Process
:: CLOCK _ MONOTONIC -> Integer | Symbol (12303.0) -
Process.#clock_gettime で使われます。
...Process.#clock_gettime で使われます。
システムによっては :MACH_ABSOLUTE_TIME_BASED_CLOCK_MONOTONIC です。
システムによっては定義されていません。... -
Process
:: CLOCK _ MONOTONIC _ COARSE -> Integer (12303.0) -
Process.#clock_gettime で使われます。
Process.#clock_gettime で使われます。
システムによっては定義されていません。 -
Process
:: CLOCK _ MONOTONIC _ FAST -> Integer (12303.0) -
Process.#clock_gettime で使われます。
Process.#clock_gettime で使われます。
システムによっては定義されていません。 -
Process
:: CLOCK _ MONOTONIC _ PRECISE -> Integer (12303.0) -
Process.#clock_gettime で使われます。
Process.#clock_gettime で使われます。
システムによっては定義されていません。 -
Process
:: CLOCK _ MONOTONIC _ RAW -> Integer (12303.0) -
Process.#clock_gettime で使われます。
Process.#clock_gettime で使われます。
システムによっては定義されていません。