種類
- インスタンスメソッド (660)
- クラス (12)
- 特異メソッド (12)
- 関数 (12)
ライブラリ
- ビルトイン (60)
-
cgi
/ html (564) -
json
/ add / complex (12) -
ripper
/ lexer (48)
クラス
- Complex (36)
- Ripper (12)
-
Ripper
:: Lexer (36) - SignalException (12)
- String (12)
モジュール
-
CGI
:: HtmlExtension (564)
キーワード
- Complex (12)
- a (24)
- base (12)
- blockquote (24)
- caption (24)
- checkbox (24)
-
checkbox
_ group (24) -
file
_ field (24) - form (48)
- hidden (24)
- html (24)
- img (24)
- inspect (12)
-
multipart
_ form (48) - parse (12)
-
parse
_ string (12) -
password
_ field (24) -
radio
_ group (24) - reset (24)
-
scrolling
_ list (24) - signm (12)
- submit (24)
-
text
_ field (24) - textarea (24)
-
to
_ c (12) -
to
_ json (12) -
to
_ s (12) - tokenize (12)
検索結果
先頭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] (21308.0) -
自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。
...自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。
ライブラリ内部で使用します。 Ripper.lex を使用してください。... -
Ripper
:: Lexer # lex -> [[Integer , Integer] , Symbol , String] (21208.0) -
自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。
...自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。
ライブラリ内部で使用します。 Ripper.lex を使用してください。... -
Ripper
. lex(src , filename = & # 39;-& # 39; , lineno = 1 , raise _ errors: false) -> [[Integer , Integer] , Symbol , String , Ripper :: Lexer :: State] (18326.0) -
Ruby プログラム str をトークンに分割し、そのリストを返します。 ただし Ripper.tokenize と違い、トークンの種類と位置情報も付属します。
...SyntaxError raise_errors が true で、src に文法エラーがある場合に発生します。
//emlist[][ruby]{
require 'ripper'
pp Ripper.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_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 は分割したトークンを詳しい情報とともに返します。
返り値の......です。
: 種類 (Symbol)
トークンの種類が「:on_XXX」の形式のシンボルで渡されます。
: トークン (String)
トークン文字列です。
: ステート (Ripper::Lexer::State)
トークンの状態を表す Ripper::Lexer::State のインスタンスです。... -
Ripper
. lex(src , filename = & # 39;-& # 39; , lineno = 1) -> [[Integer , Integer] , Symbol , String , Ripper :: Lexer :: State] (18320.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],
# [[1, 3], :on_sp, " ", EXPR_FNAME],
# [[1, 4], :on_ident, "m", EXPR_ENDFN],......, :on_sp, " ", EXPR_BEG],
# [[1, 9], :on_kw, "nil", EXPR_END],
# [[1, 12], :on_sp, " ", EXPR_END],
# on_kw, "end", EXPR_END
//}
Ripper.lex は分割したトークンを詳しい情報とともに返します。
返り値の配列の要素は 4 要素の配列 (概念的にはタプル......です。
: 種類 (Symbol)
トークンの種類が「:on_XXX」の形式のシンボルで渡されます。
: トークン (String)
トークン文字列です。
: ステート (Ripper::Lexer::State)
トークンの状態を表す Ripper::Lexer::State のインスタンスです。......。
@param lineno src の開始行番号を指定します。省略すると 1 になります。
//emlist[][ruby]{
require 'ripper'
pp Ripper.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],......ENDFN],
# [[1, 8], :on_sp, " ", BEG],
# [[1, 9], :on_kw, "nil", END],
# [[1, 12], :on_sp, " ", END],
# on_kw, "end", END
//}
Ripper.lex は分割したトークンを詳しい情報とともに返します。
返り値の配列の要素は 4 要素の配列 (概念的にはタプル... -
Ripper
. lex(src , filename = & # 39;-& # 39; , lineno = 1) -> [[Integer , Integer] , Symbol , String] (18220.0) -
Ruby プログラム str をトークンに分割し、そのリストを返します。 ただし Ripper.tokenize と違い、トークンの種類と位置情報も付属します。
...lineno src の開始行番号を指定します。省略すると 1 になります。
//emlist[][ruby]{
require 'ripper'
require 'pp'
pp Ripper.lex("def m(a) nil end")
# => [[[1, 0], :on_kw, "def"],
# [[1, 3], :on_sp, " "],
# [[1, 4], :on_ident, "m"],
# [[1, 5], :on_lparen, "("],
#......[1, 7], :on_rparen, ")"],
# [[1, 8], :on_sp, " "],
# [[1, 9], :on_kw, "nil"],
# [[1, 12], :on_sp, " "],
# on_kw, "end"
//}
Ripper.lex は分割したトークンを詳しい情報とともに返します。
返り値の配列の要素は 3 要素の配列 (概念的にはタプル......: 位置情報 (Integer,Integer)
トークンが置かれている行 (1-origin) と桁 (0-origin) の 2 要素の配列です。
: 種類 (Symbol)
トークンの種類が「:on_XXX」の形式のシンボルで渡されます。
: トークン (String)
トークン文字列です。... -
String
# to _ c -> Complex (9100.0) -
自身を複素数 (Complex) に変換した結果を返します。
...自身を複素数 (Complex) に変換した結果を返します。
以下の形式を解析できます。i、j は大文字、小文字のどちらでも解析できます。
* 実部+虚部i
* 実部+虚部j
* 絶対値@偏角
それぞれの数値は以下のいずれかの形式で指... -
static int parse
_ string(NODE *quote) (6116.0) -
lex_strterm 形式のノード quote の指示に従い、 文字列の終端または埋め込み式の始まりまで読みこみます。
...
lex_strterm 形式のノード quote の指示に従い、
文字列の終端または埋め込み式の始まりまで読みこみます。... -
Complex (6006.0)
-
複素数を扱うクラスです。
...Complex オブジェクトを作成するには、Kernel.#Complex、
Complex.rect、Complex.polar、Numeric#to_c、
String#to_c のいずれかを使用します。
//emlist[Complex オブジェクトの作り方][ruby]{
Complex(1) # => (1+0i)
Complex(2, 3) # => (2+3i)
Complex.pol......ar(2, 3) # => (-1.9799849932008908+0.2822400161197344i)
Complex(0.3) # => (0.3+0i)
Complex('0.3-0.5i') # => (0.3-0.5i)
Complex('2/3+3/4i') # => ((2/3)+(3/4)*i)
Complex('1@2') # => (-0.4161468365471424+0.9092974268256817i)
3.to_c # => (3+0i)
0.3.to_c # => (0......# => ((2/3)+(3/4)*i)
'1@2'.to_c # => (-0.4161468365471424+0.9092974268256817i)
//}
Complex オブジェクトは有理数の形式も実数の形式も扱う事ができます。
//emlist[例][ruby]{
Complex(1, 1) / 2 # => ((1/2)+(1/2)*i)
Complex(1, 1) / 2.0 # => (0.5+0.5i)
//}... -
Ripper
:: Lexer # parse -> [[Integer , Integer] , Symbol , String , Ripper :: Lexer :: State] (3217.0) -
自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。た だし Ripper::Lexer#lex と違い、結果をソートしません。
...自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。た
だし Ripper::Lexer#lex と違い、結果をソートしません。
ライブラリ内部で使用します。... -
CGI
:: HtmlExtension # html(attributes = {}) -> String (3156.0) -
トップレベルの html 要素を生成します。 ブロックを与えると、ブロックを評価した結果が内容になります。
...html{ "string" }
# <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><HTML>string</HTML>
html({ "LANG" => "ja" }){ "string" }
# <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><HTML LANG="ja">string</HTML>
html({ "DOCTYPE" => false }){ "string" }
# <HTML>string</HTML>......html({ "DOCTYPE" => '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">' }){ "string" }
# <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><HTML>string</HTML>
html({ "PRETTY" => " " }){ "<BODY></BODY>" }
# <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
# <HTML>
# <BODY>......{ "<BODY></BODY>" }
# <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
# <HTML>
# <BODY>
# </BODY>
# </HTML>
html("PRETTY"){ "<BODY></BODY>" }
# = html({ "PRETTY" => " " }){ "<BODY></BODY>" }
html(if $VERBOSE then "PRETTY" end){ "HTML string" }... -
CGI
:: HtmlExtension # html(attributes = {}) { . . . } -> String (3156.0) -
トップレベルの html 要素を生成します。 ブロックを与えると、ブロックを評価した結果が内容になります。
...html{ "string" }
# <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><HTML>string</HTML>
html({ "LANG" => "ja" }){ "string" }
# <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><HTML LANG="ja">string</HTML>
html({ "DOCTYPE" => false }){ "string" }
# <HTML>string</HTML>......html({ "DOCTYPE" => '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">' }){ "string" }
# <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><HTML>string</HTML>
html({ "PRETTY" => " " }){ "<BODY></BODY>" }
# <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
# <HTML>
# <BODY>......{ "<BODY></BODY>" }
# <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
# <HTML>
# <BODY>
# </BODY>
# </HTML>
html("PRETTY"){ "<BODY></BODY>" }
# = html({ "PRETTY" => " " }){ "<BODY></BODY>" }
html(if $VERBOSE then "PRETTY" end){ "HTML string" }... -
CGI
:: HtmlExtension # form(method = "post" , action = nil , enctype = "application / x-www-form-urlencoded") -> String (3142.0) -
form 要素を生成します。 ブロックを与えると、ブロックを評価した結果が内容になります。
...ncoded" です。
例:
form{ "string" }
# <FORM METHOD="post" ENCTYPE="application/x-www-form-urlencoded">string</FORM>
form("get"){ "string" }
# <FORM METHOD="get" ENCTYPE="application/x-www-form-urlencoded">string</FORM>
form("get", "url"){ "string" }
# <FORM METHOD="get" ACTI......ON="url" ENCTYPE="application/x-www-form-urlencoded">string</FORM>...