96件ヒット
[1-96件を表示]
(0.103秒)
ライブラリ
- ビルトイン (48)
-
json
/ add / complex (12) -
ripper
/ lexer (36)
クラス
- Complex (36)
-
Ripper
:: Lexer (36) - SignalException (12)
- String (12)
検索結果
先頭5件
- String
# to _ c -> Complex - Ripper
:: Lexer # lex -> [[Integer , Integer] , Symbol , String , Ripper :: Lexer :: State] - Ripper
:: Lexer # lex -> [[Integer , Integer] , Symbol , String] - Ripper
:: Lexer # parse -> [[Integer , Integer] , Symbol , String , Ripper :: Lexer :: State] - Ripper
:: Lexer # parse -> [[Integer , Integer] , Symbol , String]
-
String
# to _ c -> Complex (30113.0) -
自身を複素数 (Complex) に変換した結果を返します。
...自身を複素数 (Complex) に変換した結果を返します。
以下の形式を解析できます。i、j は大文字、小文字のどちらでも解析できます。
* 実部+虚部i
* 実部+虚部j
* 絶対値@偏角
それぞれの数値は以下のいずれかの形式で指......進数の形式
* "0.3E0" のような x.xEn の形式
自身が解析できない値であった場合は 0+0i を返します。
//emlist[例][ruby]{
'9'.to_c # => (9+0i)
'2.5'.to_c # => (2.5+0i)
'2.5/1'.to_c # => ((5/2)+0i)
'-3/2'.to_c # => ((-3/2)+0i)
'-i'.to_c.......to_c # => (-400.0-0.04i)
'-0.0-0.0i'.to_c # => (-0.0-0.0i)
'1/2+3/4i'.to_c # => ((1/2)+(3/4)*i)
'10@10'.to_c # => (-8.390715290764524-5.440211108893697i)
'-0.3_3'.to_c # => (-0.33+0i)
" \t\r\n5+3i".to_c # => (5+3i)
'5+3ix'.to_c # => (5+3i)
'ruby'.to_c # => (0+0i)
//}... -
Ripper
:: Lexer # lex -> [[Integer , Integer] , Symbol , String , Ripper :: Lexer :: State] (21426.0) -
自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。
...自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。
ライブラリ内部で使用します。 Ripper.lex を使用してください。... -
Ripper
:: Lexer # lex -> [[Integer , Integer] , Symbol , String] (21326.0) -
自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。
...自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。
ライブラリ内部で使用します。 Ripper.lex を使用してください。... -
Ripper
:: Lexer # parse -> [[Integer , Integer] , Symbol , String , Ripper :: Lexer :: State] (3335.0) -
自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。た だし Ripper::Lexer#lex と違い、結果をソートしません。
...自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。た
だし Ripper::Lexer#lex と違い、結果をソートしません。
ライブラリ内部で使用します。... -
Ripper
:: Lexer # parse -> [[Integer , Integer] , Symbol , String] (3235.0) -
自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。た だし Ripper::Lexer#lex と違い、結果をソートしません。
...自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。た
だし Ripper::Lexer#lex と違い、結果をソートしません。
ライブラリ内部で使用します。... -
Ripper
:: Lexer # tokenize -> [String] (3219.0) -
自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。
...自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。
ライブラリ内部で使用します。 Ripper.tokenize を使用してください。... -
Complex
# inspect -> String (3209.0) -
自身を人間が読みやすい形の文字列表現にして返します。
...す。
//emlist[例][ruby]{
Complex(2).inspect # => "(2+0i)"
Complex('-8/6').inspect # => "((-4/3)+0i)"
Complex('1/2i').inspect # => "(0+(1/2)*i)"
Complex(0, Float::INFINITY).inspect # => "(0+Infinity*i)"
Complex(Float::NAN, Float::NAN).i... -
Complex
# to _ json(*args) -> String (3209.0) -
自身を JSON 形式の文字列に変換して返します。
...ら JSON::Generator::GeneratorMethods::Hash#to_json を呼び出しています。
@param args 使用しません。
//emlist[例][ruby]{
require 'json/add/complex'
Complex(2, 3).to_json # => "{\"json_class\":\"Complex\",\"r\":2,\"i\":3}"
//}
@see JSON::Generator::GeneratorMethods::Hash#to_json......@param args 引数はそのまま JSON::Generator::GeneratorMethods::Hash#to_json
に渡されます。
//emlist[例][ruby]{
require 'json/add/complex'
Complex(2, 3).to_json # => "{\"json_class\":\"Complex\",\"r\":2,\"i\":3}"
//}
@see JSON::Generator::GeneratorMethods::Hash#to_json... -
Complex
# to _ s -> String (3209.0) -
自身を "実部 + 虚部i" 形式の文字列にして返します。
...して返します。
//emlist[例][ruby]{
Complex(2).to_s # => "2+0i"
Complex('-8/6').to_s # => "-4/3+0i"
Complex('1/2i').to_s # => "0+1/2i"
Complex(0, Float::INFINITY).to_s # => "0+Infinity*i"
Complex(Float::NAN, Float::NAN).to_s # =>... -
SignalException
# signm -> String (3209.0) -
self.message のエイリアスです。
...self.message のエイリアスです。
//emlist[例][ruby]{
begin
Process.kill('HUP', Process.pid)
sleep
rescue SignalException => e
puts e.signm # => SIGHUP
end
//}...