5件ヒット
[1-5件を表示]
(0.021秒)
ライブラリ
- ビルトイン (2)
-
rdoc
/ anon _ class (1) -
ripper
/ filter (1)
キーワード
- AnonClass (1)
- ConditionVariable (1)
- Filter (1)
- Location (1)
- Options (1)
検索結果
先頭5件
-
Thread
:: ConditionVariable (36022.0) -
スレッドの同期機構の一つである状態変数を実現するクラスです。
...が空になった場合、
あるいは満タンになった場合に Condition Variable を使って wait しています。
require 'thread'
class TinyQueue
def initialize(max=2)
@max = max
@full = ConditionVariable.new
@empty = ConditionVariable.new
@mutex = Mut... -
RDoc
:: AnonClass (36004.0) -
匿名クラスを表現するクラスです。
匿名クラスを表現するクラスです。
現在は使用されていません。 -
RDoc
:: Options (18040.0) -
rdoc コマンドのオプションを解析するためのクラスです。
...ンは必ず指定
する必要があります。rdoc --help を実行すると追加したオプションの一覧が
確認できます。
例:
class RDoc::Generator::Spellcheck
RDoc::RDoc.add_generator self
def self.setup_options rdoc_options
op = rdoc_options.option_parser... -
Thread
:: Backtrace :: Location (18022.0) -
Ruby のフレームを表すクラスです。
...例1の実行結果:
caller_locations.rb:2:in `a'
caller_locations.rb:5:in `b'
caller_locations.rb:8:in `c'
//emlist[例2][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end
Foo.new(0..2).locations.map do |call|
p... -
Ripper
:: Filter (130.0) -
イベントドリブンスタイルで Ruby プログラムを加工するためのクラスです。
...e '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.escapeHT...