種類
- インスタンスメソッド (762)
- 特異メソッド (55)
- モジュール関数 (24)
ライブラリ
- ビルトイン (223)
-
cgi
/ html (517) - cmath (24)
-
json
/ add / complex (11) - matrix (22)
-
ripper
/ lexer (44)
クラス
- Bignum (3)
- Complex (165)
- Matrix (22)
- Ripper (11)
-
Ripper
:: Lexer (33) - SignalException (55)
- String (11)
モジュール
-
CGI
:: HtmlExtension (517) - CMath (24)
キーワード
- a (22)
- angle (11)
- arg (11)
- base (11)
- blockquote (22)
- checkbox (22)
-
checkbox
_ group (22) - clamp (11)
- conjugate (11)
- denominator (11)
- fdiv (3)
-
file
_ field (22) - form (44)
- hidden (22)
- html (22)
- imag (11)
- imaginary (11)
- img (22)
- inspect (11)
- log (12)
- log10 (6)
- log2 (6)
- magnitude (11)
-
multipart
_ form (44) - new (33)
- parse (11)
-
password
_ field (22) - phase (11)
-
radio
_ group (22) - rectangular (22)
- reset (22)
-
scrolling
_ list (22) - signm (11)
- signo (11)
- submit (22)
-
text
_ field (22) - textarea (22)
-
to
_ c (11) -
to
_ i (11) -
to
_ json (11) -
to
_ s (11) - tokenize (11)
- tr (11)
- trace (11)
検索結果
先頭5件
- Ripper
:: Lexer # lex -> [[Integer , Integer] , Symbol , String , Ripper :: Lexer :: State] - Ripper
:: Lexer # lex -> [[Integer , Integer] , Symbol , String] - Ripper
. lex(src , filename = & # 39;-& # 39; , lineno = 1 , raise _ errors: false) -> [[Integer , Integer] , Symbol , String , Ripper :: Lexer :: State] - Ripper
. lex(src , filename = & # 39;-& # 39; , lineno = 1) -> [[Integer , Integer] , Symbol , String , Ripper :: Lexer :: State] - Ripper
. lex(src , filename = & # 39;-& # 39; , lineno = 1) -> [[Integer , Integer] , Symbol , String]
-
Ripper
:: Lexer # lex -> [[Integer , Integer] , Symbol , String , Ripper :: Lexer :: State] (21507.0) -
自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。
...自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。
ライブラリ内部で使用します。 Ripper.lex を使用してください。... -
Ripper
:: Lexer # lex -> [[Integer , Integer] , Symbol , String] (21407.0) -
自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。
...自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。
ライブラリ内部で使用します。 Ripper.lex を使用してください。... -
Ripper
. lex(src , filename = & # 39;-& # 39; , lineno = 1 , raise _ errors: false) -> [[Integer , Integer] , Symbol , String , Ripper :: Lexer :: State] (18531.0) -
Ruby プログラム str をトークンに分割し、そのリストを返します。 ただし Ripper.tokenize と違い、トークンの種類と位置情報も付属します。
...を文字列か IO オブジェクトで指定します。
@param filename src のファイル名を文字列で指定します。省略すると "-" になります。
@param lineno src の開始行番号を指定します。省略すると 1 になります。
@param raise_errors true を指定......ipper.lex("def m(a) nil end")
# => [[[1, 0], :on_kw, "def", FNAME],
# [[1, 3], :on_sp, " ", FNAME],
# [[1, 4], :on_ident, "m", ENDFN],
# [[1, 5], :on_lparen, "(", BEG|LABEL],
# [[1, 6], :on_ident, "a", ARG],
# [[1, 7], :on_rparen, ")", ENDFN],
# [[1, 8], :on_sp, " ", BEG],
#......on_kw, "nil", END],
# [[1, 12], :on_sp, " ", END],
# on_kw, "end", END
Ripper.lex("def req(true) end", raise_errors: true)
# => SyntaxError (syntax error, unexpected `true', expecting ')')
//}
Ripper.lex は分割したトークンを詳しい情報とともに返します。
返り値の... -
Ripper
. lex(src , filename = & # 39;-& # 39; , lineno = 1) -> [[Integer , Integer] , Symbol , String , Ripper :: Lexer :: State] (18525.0) -
Ruby プログラム str をトークンに分割し、そのリストを返します。 ただし Ripper.tokenize と違い、トークンの種類と位置情報も付属します。
...ファイル名を文字列で指定します。省略すると "-" になります。
@param lineno src の開始行番号を指定します。省略すると 1 になります。
//emlist[][ruby]{
require 'ripper'
pp Ripper.lex("def m(a) nil end")
# => [[[1, 0], :on_kw, "def", EXPR_FNAME],
#......ren, "(", EXPR_BEG|EXPR_LABEL],
# [[1, 6], :on_ident, "a", EXPR_ARG],
# [[1, 7], :on_rparen, ")", EXPR_ENDFN],
# [[1, 8], :on_sp, " ", EXPR_BEG],
# [[1, 9], :on_kw, "nil", EXPR_END],
# [[1, 12], :on_sp, " ", EXPR_END],
# on_kw, "end", EXPR_END
//}
Ripper.lex は分割した......す。
: 位置情報 (Integer,Integer)
トークンが置かれている行 (1-origin) と桁 (0-origin) の 2 要素の配列です。
: 種類 (Symbol)
トークンの種類が「:on_XXX」の形式のシンボルで渡されます。
: トークン (String)
トークン文字列で......ファイル名を文字列で指定します。省略すると "-" になります。
@param lineno src の開始行番号を指定します。省略すると 1 になります。
//emlist[][ruby]{
require 'ripper'
pp Ripper.lex("def m(a) nil end")
# => [[[1, 0], :on_kw, "def", FNAME],
#......# [[1, 5], :on_lparen, "(", BEG|LABEL],
# [[1, 6], :on_ident, "a", ARG],
# [[1, 7], :on_rparen, ")", ENDFN],
# [[1, 8], :on_sp, " ", BEG],
# [[1, 9], :on_kw, "nil", END],
# [[1, 12], :on_sp, " ", END],
# on_kw, "end", END
//}
Ripper.lex は分割したトークンを詳... -
Ripper
. lex(src , filename = & # 39;-& # 39; , lineno = 1) -> [[Integer , Integer] , Symbol , String] (18425.0) -
Ruby プログラム str をトークンに分割し、そのリストを返します。 ただし Ripper.tokenize と違い、トークンの種類と位置情報も付属します。
...イル名を文字列で指定します。省略すると "-" になります。
@param lineno src の開始行番号を指定します。省略すると 1 になります。
//emlist[][ruby]{
require 'ripper'
require 'pp'
pp Ripper.lex("def m(a) nil end")
# => [[[1, 0], :on_kw, "def"],
# [[.......lex は分割したトークンを詳しい情報とともに返します。
返り値の配列の要素は 3 要素の配列 (概念的にはタプル) です。
その内訳を以下に示します。
: 位置情報 (Integer,Integer)
トークンが置かれている行 (1-origin) と桁 (0-......origin) の 2 要素の配列です。
: 種類 (Symbol)
トークンの種類が「:on_XXX」の形式のシンボルで渡されます。
: トークン (String)
トークン文字列です。... -
SignalException
# signm -> String (12200.0) -
self.message のエイリアスです。
...self.message のエイリアスです。
//emlist[例][ruby]{
begin
Process.kill('HUP', Process.pid)
sleep
rescue SignalException => e
puts e.signm # => SIGHUP
end
//}... -
SignalException
# signo -> Integer (12200.0) -
self のシグナル番号を返します。
...self のシグナル番号を返します。
//emlist[例][ruby]{
p Signal.signame(1) # => "HUP"
begin
Process.kill('HUP', Process.pid)
sleep
rescue SignalException => e
p e.signo # => 1
end
//}... -
Complex
# angle -> Float (9248.0) -
自身の偏角を[-π,π]の範囲で返します。
...-π,π]の範囲で返します。
//emlist[例][ruby]{
Complex.polar(3, Math::PI/2).arg # => 1.5707963267948966
//}
非正の実軸付近での挙動に注意してください。以下の例のように虚部が 0.0 と
-0.0 では値が変わります。
//emlist[例][ruby]{
Complex(-1, 0).arg......89793
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.1415926......53589793
//}
@see Numeric#arg... -
Complex
# arg -> Float (9248.0) -
自身の偏角を[-π,π]の範囲で返します。
...-π,π]の範囲で返します。
//emlist[例][ruby]{
Complex.polar(3, Math::PI/2).arg # => 1.5707963267948966
//}
非正の実軸付近での挙動に注意してください。以下の例のように虚部が 0.0 と
-0.0 では値が変わります。
//emlist[例][ruby]{
Complex(-1, 0).arg......89793
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.1415926......53589793
//}
@see Numeric#arg... -
CGI
:: HtmlExtension # checkbox _ group(attributes) -> String (9200.0) -
タイプが checkbox である input 要素のグループを生成します。
...ハッシュで指定します。
例:
checkbox_group({ "NAME" => "name",
"VALUES" => ["foo", "bar", "baz"] })
checkbox_group({ "NAME" => "name",
"VALUES" => [["foo"], ["bar", true], "baz"] })
checkbox_group({ "NAME" => "name",
"VALUE... -
CGI
:: HtmlExtension # checkbox _ group(name = "" , *values) -> String (9200.0) -
タイプが checkbox である input 要素のグループを生成します。
...値になります。
例:
checkbox_group("name", "foo", "bar", "baz")
# <INPUT TYPE="checkbox" NAME="name" VALUE="foo">foo
# <INPUT TYPE="checkbox" NAME="name" VALUE="bar">bar
# <INPUT TYPE="checkbox" NAME="name" VALUE="baz">baz
checkbox_group("name", ["foo"], ["bar", true], "baz"......VALUE="foo">foo
# <INPUT TYPE="checkbox" CHECKED NAME="name" VALUE="bar">bar
# <INPUT TYPE="checkbox" NAME="name" VALUE="baz">baz
checkbox_group("name", ["1", "Foo"], ["2", "Bar", true], "Baz")
# <INPUT TYPE="checkbox" NAME="name" VALUE="1">Foo
# <INPUT TYPE="checkbox" SELECTED NA... -
CGI
:: HtmlExtension # image _ button(attributes) -> String (9200.0) -
タイプが image の input 要素を生成します。
...タイプが image の input 要素を生成します。
@param attributes 属性をハッシュで指定します。
例:
image_button({ "SRC" => "url", "ALT" => "string" })
# <INPUT TYPE="image" SRC="url" ALT="string">... -
CGI
:: HtmlExtension # image _ button(src = "" , name = nil , alt = nil) -> String (9200.0) -
タイプが image の input 要素を生成します。
...mage の input 要素を生成します。
@param src src 属性の値を指定します。
@param name name 属性の値を指定します。
@param alt alt 属性の値を指定します。
例:
image_button("url")
# <INPUT TYPE="image" SRC="url">
image_button("url", "name", "string")......# <INPUT TYPE="image" SRC="url" NAME="name" ALT="string">...