ライブラリ
- ビルトイン (19)
- abbrev (11)
-
cgi
/ html (22) - e2mmap (12)
- etc (22)
- logger (1)
-
minitest
/ unit (1) - mkmf (11)
-
net
/ telnet (4) - pp (33)
- psych (22)
- rake (33)
- readline (22)
- ripper (22)
-
ripper
/ filter (22) -
ripper
/ lexer (66) -
rubygems
/ installer (11) -
rubygems
/ package / tar _ input (11) -
rubygems
/ requirement (11) - socket (11)
クラス
-
Gem
:: Installer (11) -
Gem
:: Package :: TarInput (11) -
Gem
:: Requirement (11) -
Logger
:: Application (1) -
Net
:: Telnet (4) - Object (33)
-
Psych
:: Nodes :: Mapping (22) -
Rake
:: Application (33) - Ripper (55)
-
Ripper
:: Filter (11) -
Ripper
:: Lexer (33) -
RubyVM
:: InstructionSequence (11) - Socket (11)
モジュール
- Abbrev (11)
-
CGI
:: HtmlExtension (22) - Etc (22)
- Exception2MessageMapper (12)
- Kernel (11)
-
MiniTest
:: Assertions (1) - Readline (22)
-
RubyVM
:: AbstractSyntaxTree (8)
キーワード
- Filter (11)
-
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 3
. 0 . 0 (4) -
NEWS for Ruby 3
. 1 . 0 (3) -
SC
_ MAPPED _ FILES (11) - Version (11)
- abbrev (11)
- anchor (11)
-
app
_ script _ text (11) - appname (1)
-
compile
_ option (11) -
completion
_ append _ character (11) -
completion
_ append _ character= (11) -
cpp
_ command (11) - filename (22)
- form (22)
- getaddrinfo (11)
- irb (11)
- lex (22)
- login (4)
-
mu
_ pp (1) - name (11)
-
original
_ dir (11) - parse (19)
-
pretty
_ inspect (11) -
pretty
_ print (11) -
pretty
_ print _ inspect (11) -
pretty
_ print _ instance _ variables (11) - rakefile (11)
- slice (11)
- tag (11)
- tokenize (22)
- uname (11)
-
zipped
_ stream (11)
検索結果
先頭5件
-
Rake
:: Application # original _ dir -> String (3101.0) -
rake コマンドを実行したディレクトリを返します。
...rake コマンドを実行したディレクトリを返します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
Rake.application.original_dir # => "/path/to/dir"
end
//}... -
Rake
:: Application # rakefile -> String (3101.0) -
実際に使用されている Rakefile の名前を返します。
...実際に使用されている Rakefile の名前を返します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
Rake.application.rakefile # => "Rakefile"
end
//}... -
Ripper
# filename -> String (3101.0) -
自身の持つ Ruby プログラムのファイル名を文字列で返します。
自身の持つ Ruby プログラムのファイル名を文字列で返します。 -
Ripper
. tokenize(src , filename = & # 39;-& # 39; , lineno = 1) -> [String] (3101.0) -
Ruby プログラム str をトークンに分割し、そのリストを返します。
...号を指定します。省略すると 1 になります。
//emlist[][ruby]{
require 'ripper'
p Ripper.tokenize("def m(a) nil end")
# => ["def", " ", "m", "(", "a", ")", " ", "nil", " ", "end"]
//}
Ripper.tokenize は空白やコメントも含め、
元の文字列にある文字は 1 バイ... -
Ripper
. tokenize(src , filename = & # 39;-& # 39; , lineno = 1 , raise _ errors: false) -> [String] (3101.0) -
Ruby プログラム str をトークンに分割し、そのリストを返します。
...//emlist[][ruby]{
require 'ripper'
p Ripper.tokenize("def m(a) nil end")
# => ["def", " ", "m", "(", "a", ")", " ", "nil", " ", "end"]
Ripper.tokenize("def req(true) end", raise_errors: true)
# => SyntaxError (syntax error, unexpected `true', expecting ')')
//}
Ripper.tokenize は空白やコメ... -
Ripper
:: Filter # filename -> String (3101.0) -
Ruby プログラムのファイル名を文字列で返します。
Ruby プログラムのファイル名を文字列で返します。 -
Ripper
:: Lexer # lex -> [[Integer , Integer] , Symbol , String] (3101.0) -
自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。
...自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。
ライブラリ内部で使用します。 Ripper.lex を使用してください。... -
Ripper
:: Lexer # parse -> [[Integer , Integer] , Symbol , String] (3101.0) -
自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。た だし Ripper::Lexer#lex と違い、結果をソートしません。
...自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。た
だし Ripper::Lexer#lex と違い、結果をソートしません。
ライブラリ内部で使用します。... -
Ripper
:: Lexer # tokenize -> [String] (3101.0) -
自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。
...自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。
ライブラリ内部で使用します。 Ripper.tokenize を使用してください。... -
Ripper
:: Version -> String (3101.0) -
ripper のバージョンを文字列で返します。
...ripper のバージョンを文字列で返します。... -
Ripper
:: Filter (3006.0) -
イベントドリブンスタイルで Ruby プログラムを加工するためのクラスです。
...require 'ripper'
require 'cgi'
class Ruby2HTML < Ripper::Filter
def on_default(event, tok, f)
f << CGI.escapeHTML(tok)
end
def on_comment(tok, f)
f << %Q[<span class="comment">#{CGI.escapeHTML(tok)}</span>]
end
def on_tstring_beg(tok, f)
f << %Q[<span class="string">#{CGI.es......capeHTML(tok)}]
end
def on_tstring_end(tok, f)
f << %Q[#{CGI.escapeHTML(tok)}</span>]
end
end
Ruby2HTML.new(ARGF).parse('')
//}
Ruby プログラムを解析して、Ripper::SCANNER_EVENTS にあるスキャナ
イベントを実行します。イベントはプログラムに書いた... -
NEWS for Ruby 3
. 0 . 0 (264.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...[[[1]], {}]
pr.call([1, {a: 1}])
# 2.7 => [[1], {:a=>1}] # and deprecation warning
# 3.0 => a=>1}, {}]
//}
* Arguments forwarding (`...`) now supports leading arguments.
16378
//emlist{
def method_missing(meth, ...)
send(:"do_#{meth}", ...)
end
//}
* Pattern matching (`case/in`) is......", "f", 3]
in [*pre, String => x, String => y, *post]
p pre #=> ["a", 1]
p x #=> "b"
p y #=> "c"
p post #=> [2, "d", "e", "f", 3]
end
//}
* Endless method definition is added. [EXPERIMENTAL]
16746
//emlist{
def square(x) = x * x
//}
* Interpolated String literals are no lo......nger frozen when
`# frozen-string-literal: true` is used. 17104
* Magic comment `shareable_constant_value` added to freeze constants.
See {Magic Comments}[rdoc-ref:doc/syntax/comments.rdoc@Magic+Comments] for more details.
17273
* A {static analysis}[rdoc-label:label-Static+analysis]... -
CGI
:: HtmlExtension # form(method = "post" , action = nil , enctype = "application / x-www-form-urlencoded") -> String (242.0) -
form 要素を生成します。 ブロックを与えると、ブロックを評価した結果が内容になります。
..."application/x-www-form-urlencoded" です。
例:
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" ACTION="url" ENCTYPE="application/x-www-form-urlencoded">string</FORM>...