1037件ヒット
[1-100件を表示]
(0.059秒)
種類
- 定数 (458)
- インスタンスメソッド (409)
- モジュール関数 (91)
- 特異メソッド (67)
- クラス (12)
クラス
- Array (21)
- Binding (7)
-
Encoding
:: Converter (48) - IO (36)
- Integer (40)
- Method (12)
- Module (12)
- Object (18)
- Proc (12)
- Rational (96)
- Regexp (36)
-
RubyVM
:: InstructionSequence (12) - SignalException (12)
- String (21)
-
Thread
:: Backtrace :: Location (12) - Time (51)
- UnboundMethod (12)
モジュール
- Enumerable (24)
-
File
:: Constants (332) - GC (12)
- Kernel (79)
- Marshal (24)
- Process (96)
キーワード
- APPEND (12)
- BINARY (12)
-
CLOCK
_ MONOTONIC (12) -
CLOCK
_ MONOTONIC _ COARSE (12) -
CLOCK
_ MONOTONIC _ FAST (12) -
CLOCK
_ MONOTONIC _ PRECISE (12) -
CLOCK
_ MONOTONIC _ RAW (12) -
CLOCK
_ MONOTONIC _ RAW _ APPROX (12) -
CLOCK
_ SECOND (12) - CREAT (12)
- DIRECT (12)
- DSYNC (12)
- EXCL (12)
-
FNM
_ CASEFOLD (12) -
FNM
_ DOTMATCH (12) -
FNM
_ EXTGLOB (12) -
FNM
_ NOESCAPE (12) -
FNM
_ PATHNAME (12) -
FNM
_ SYSCASE (12) -
INTERNAL
_ CONSTANTS (12) -
LOCK
_ EX (12) -
LOCK
_ NB (12) -
LOCK
_ SH (12) -
LOCK
_ UN (12) -
MAJOR
_ VERSION (12) -
MINOR
_ VERSION (12) - NOATIME (12)
- NOCTTY (12)
- NOFOLLOW (12)
- NONBLOCK (12)
- RDONLY (12)
- RDWR (12)
- RSYNC (12)
-
RUBY
_ REVISION (6) - Rational (24)
-
SHARE
_ DELETE (10) - SYNC (12)
- TMPFILE (10)
- TRUNC (12)
- WRONLY (12)
- at (15)
- byteindex (3)
- ceil (12)
-
clock
_ gettime (12) - compile (12)
- concat (18)
-
const
_ source _ location (12) - denominator (12)
-
first
_ lineno (12) - floor (12)
- hash (12)
- lineno (12)
- mon (12)
- month (12)
- new (12)
- numerator (12)
- one? (45)
-
primitive
_ convert (48) - rationalize (24)
- round (12)
- signo (12)
-
singleton
_ class (12) -
source
_ location (43) - spawn (48)
- subsec (12)
- syscall (12)
-
to
_ i (12) -
to
_ r (12) - truncate (12)
-
try
_ convert (4) - write (24)
-
write
_ nonblock (12)
検索結果
先頭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) -
引数を整数 に変換した結果を返します。
...フィクスは、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 で使われます。
システムによっては定義されていません。