2件ヒット
[1-2件を表示]
(0.037秒)
検索結果
-
Ripper
:: Lexer # parse -> [[Integer , Integer] , Symbol , String] (63607.0) -
自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。た だし Ripper::Lexer#lex と違い、結果をソートしません。
自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。た
だし Ripper::Lexer#lex と違い、結果をソートしません。
ライブラリ内部で使用します。 -
Ripper
:: Filter (9055.0) -
イベントドリブンスタイルで Ruby プログラムを加工するためのクラスです。
イベントドリブンスタイルで Ruby プログラムを加工するためのクラスです。
このクラスを継承して、必要なイベントに対応するメソッドを定義して使用し
ます。
=== 使用例
//emlist[][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">...