るりまサーチ

最速Rubyリファレンスマニュアル検索!
60件ヒット [1-60件を表示] (0.044秒)
トップページ > クエリ:object[x] > クエリ:>[x] > クエリ:value[x] > 種類:モジュール関数[x]

別のキーワード

  1. objectspace each_object
  2. _builtin each_object
  3. object to_enum
  4. object send
  5. object enum_for

ライブラリ

モジュール

キーワード

検索結果

OpenSSL::ASN1.#ObjectId(value) -> OpenSSL::ASN1::ObjectId -> OpenSSL::ASN1::ObjectId (6609.0)

ASN.1 の ObjectId 型の値を表現する Ruby のオブジェクトを 生成します。

...ASN.1 の ObjectId 型の値を表現する Ruby のオブジェクトを
生成します。

OpenSSL::ASN1::ObjectId.new と同じです。

@param value ASN.1 オブジェクト識別子を表す文字列
@param tag タグ番号
@param tagging タグ付けの方法(:IMPLICIT もしくは :EXPLICIT...

OpenSSL::ASN1.#ObjectId(value, tag, tagging, tag_class) -> OpenSSL::ASN1::ObjectId (6409.0)

ASN.1 の ObjectId 型の値を表現する Ruby のオブジェクトを 生成します。

...ASN.1 の ObjectId 型の値を表現する Ruby のオブジェクトを
生成します。

OpenSSL::ASN1::ObjectId.new と同じです。

@param value ASN.1 オブジェクト識別子を表す文字列
@param tag タグ番号
@param tagging タグ付けの方法(:IMPLICIT もしくは :EXPLICIT...

Kernel.#throw(tag, value = nil) -> () (220.0)

Kernel.#catchとの組み合わせで大域脱出を行います。 throw は同じ tag を指定した catch のブロックの終わりまでジャンプします。

...、例外で
スレッドが終了します。

同じ tag であるとは Object#object_id が同じであるという意味です。

@param tag catch の引数に対応する任意のオブジェクトです。
@param value catch の戻り値になります。
@raise ArgumentError 同じ tag で...
...いる catch が存在しない場合に発生します。

//emlist[例][ruby]{
def foo
throw :exit, 25
end

ret = catch(:exit) do
begin
foo
some_process() # 絶対に実行されない
10
ensure
puts "ensure"
end
end
puts ret
#=> ensure
# 25
//}

@see Kernel.#catch...
...、例外で
スレッドが終了します。

同じ tag であるとは Object#object_id が同じであるという意味です。

@param tag catch の引数に対応する任意のオブジェクトです。
@param value catch の戻り値になります。
@raise UncaughtThrowError 同じ tag...

Kernel.#Float(arg) -> Float (149.0)

引数を浮動小数点数(Float)に変換した結果を返します。

...> 4.0
p Float(4_000) #=> 4000.0
p Float(9.88) #=> 9.88

p Float(Time.gm(1986)) #=> 504921600.0
p Float(Object.new) # can't convert Object into Float (TypeError)
p Float(nil) # can't convert nil into Float (TypeError)

p Float("10") #=> 10.0
p Float("10e2") #=>...
...p Float("1e-2") #=> 0.01
p Float(".1") #=> 0.1
p Float("0xa") #=> 10.0

p Float("nan") # invalid value for Float(): "nan" (ArgumentError)
p Float("INF") # invalid value for Float(): "INF" (ArgumentError)
p Float("-Inf") # invalid value for Float(): "-Inf" (Ar...
...* 1000)) #=> Infinity
p Float("0xa.a") # invalid value for Float(): "0xa.a" (ArgumentError)
p Float(" \n10\s \t") #=> 10.0 # 先頭と末尾の空白類は無視される
p Float("1\n0") # invalid value for Float(): "1\n0" (ArgumentError)
p Float("") # invalid value for Float()...

Kernel.#Float(arg, exception: true) -> Float | nil (149.0)

引数を浮動小数点数(Float)に変換した結果を返します。

...> 4.0
p Float(4_000) #=> 4000.0
p Float(9.88) #=> 9.88

p Float(Time.gm(1986)) #=> 504921600.0
p Float(Object.new) # can't convert Object into Float (TypeError)
p Float(nil) # can't convert nil into Float (TypeError)

p Float("10") #=> 10.0
p Float("10e2") #=>...
...p Float("1e-2") #=> 0.01
p Float(".1") #=> 0.1
p Float("0xa") #=> 10.0

p Float("nan") # invalid value for Float(): "nan" (ArgumentError)
p Float("INF") # invalid value for Float(): "INF" (ArgumentError)
p Float("-Inf") # invalid value for Float(): "-Inf" (Ar...
...* 1000)) #=> Infinity
p Float("0xa.a") # invalid value for Float(): "0xa.a" (ArgumentError)
p Float(" \n10\s \t") #=> 10.0 # 先頭と末尾の空白類は無視される
p Float("1\n0") # invalid value for Float(): "1\n0" (ArgumentError)
p Float("") # invalid value for Float()...

絞り込み条件を変える

Kernel.#Integer(arg, base = 0) -> Integer (131.0)

引数を整数 (Fixnum,Bignum) に変換した結果を返します。

...#=> 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 I...
...=> 8
p Integer("0o10") #=> 8
p Integer("0x10") #=> 16
p Integer("0b10") #=> 2
p Integer(" \n10\t ") #=> 10 # 先頭と末尾の空白類は無視される
p Integer("1\n0") # `Integer': invalid value for Integer: "1\n0" (ArgumentError)
p Integer("hoge") # `Integer': invalid value...
...for Integer: "hoge" (ArgumentError)
p Integer("") # `Integer': invalid value for Integer: "" (ArgumentError)
//}

@see String#hex,String#oct,String#to_i,Integer...

Kernel.#Integer(arg, base = 0, exception: true) -> Integer | nil (131.0)

引数を整数 に変換した結果を返します。

...#=> 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 I...
...=> 8
p Integer("0o10") #=> 8
p Integer("0x10") #=> 16
p Integer("0b10") #=> 2
p Integer(" \n10\t ") #=> 10 # 先頭と末尾の空白類は無視される
p Integer("1\n0") # `Integer': invalid value for Integer: "1\n0" (ArgumentError)
p Integer("hoge") # `Integer': invalid value...
...for Integer: "hoge" (ArgumentError)
p Integer("") # `Integer': invalid value for Integer: "" (ArgumentError)
//}

@see String#hex,String#oct,String#to_i,Integer...