るりまサーチ (Ruby 3.1)

最速Rubyリファレンスマニュアル検索!
5件ヒット [1-5件を表示] (0.015秒)
トップページ > クエリ:lex[x] > バージョン:3.1[x] > クエリ:arg[x]

別のキーワード

  1. ripper/lexer lex
  2. lexer lex
  3. ripper lex
  4. irb irb/ruby-lex
  5. lex

ライブラリ

クラス

キーワード

検索結果

Ripper.lex(src, filename = '-', lineno = 1, raise_errors: false) -> [[Integer, Integer], Symbol, String, Ripper::Lexer::State] (54676.0)

Ruby プログラム str をトークンに分割し、そのリストを返します。 ただし Ripper.tokenize と違い、トークンの種類と位置情報も付属します。

Ruby プログラム str をトークンに分割し、そのリストを返します。
ただし Ripper.tokenize と違い、トークンの種類と位置情報も付属します。

@param src Ruby プログラムを文字列か IO オブジェクトで指定します。

@param filename src のファイル名を文字列で指定します。省略すると "-" になります。

@param lineno src の開始行番号を指定します。省略すると 1 になります。

@param raise_errors true を指定すると、src にエラーがある場合に例外(SyntaxError)を発生させます。省...

Complex#arg -> Float (54466.0)

自身の偏角を[-π,π]の範囲で返します。

...0).arg #=> 3.141592653589793
Complex(-1, -0).arg #=> 3.141592653589793
Complex(-1, -0.0).arg #=> -3.141592653589793

Complex(0, 0.0).arg #=> 0.0
Complex(0, -0.0).arg #=> -0.0
Complex(-0.0, 0).arg #=> 3.141592653589793
Complex(...
...-0.0, -0.0).arg #=> -3.141592653589793
//}


@see Numeric#arg...

Complex#to_json(*args) -> String (9301.0)

自身を JSON 形式の文字列に変換して返します。

自身を JSON 形式の文字列に変換して返します。

内部的にはハッシュにデータをセットしてから 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\"...

Complex#angle -> Float (9166.0)

自身の偏角を[-π,π]の範囲で返します。

...0).arg #=> 3.141592653589793
Complex(-1, -0).arg #=> 3.141592653589793
Complex(-1, -0.0).arg #=> -3.141592653589793

Complex(0, 0.0).arg #=> 0.0
Complex(0, -0.0).arg #=> -0.0
Complex(-0.0, 0).arg #=> 3.141592653589793
Complex(...
...-0.0, -0.0).arg #=> -3.141592653589793
//}


@see Numeric#arg...

Complex#phase -> Float (9166.0)

自身の偏角を[-π,π]の範囲で返します。

...0).arg #=> 3.141592653589793
Complex(-1, -0).arg #=> 3.141592653589793
Complex(-1, -0.0).arg #=> -3.141592653589793

Complex(0, 0.0).arg #=> 0.0
Complex(0, -0.0).arg #=> -0.0
Complex(-0.0, 0).arg #=> 3.141592653589793
Complex(...
...-0.0, -0.0).arg #=> -3.141592653589793
//}


@see Numeric#arg...

絞り込み条件を変える