752件ヒット
[101-200件を表示]
(0.029秒)
ライブラリ
- ビルトイン (228)
- coverage (7)
- date (48)
- getoptlong (12)
- monitor (24)
-
net
/ http (24) -
net
/ smtp (116) - objspace (12)
- psych (36)
-
rdoc
/ code _ object (12) -
rdoc
/ markup (12) -
rdoc
/ markup / formatter (12) - socket (60)
-
webrick
/ httputils (24)
クラス
- Array (84)
- Coverage (7)
- Date (12)
- DateTime (36)
- GetoptLong (12)
- MatchData (48)
-
Net
:: HTTPResponse (24) -
Net
:: SMTP (116) - Object (12)
-
Psych
:: Visitors :: YAMLTree (36) -
RDoc
:: CodeObject (12) -
RDoc
:: Markup (12) -
RDoc
:: Markup :: Formatter (12) - Socket (24)
- Symbol (12)
- Thread (24)
-
WEBrick
:: HTTPUtils :: FormData (24)
モジュール
-
GC
:: Profiler (12) - Kernel (36)
- ObjectSpace (12)
-
Socket
:: Constants (24)
キーワード
-
IFF
_ XMIT _ DST _ RELEASE (24) -
MSG
_ FLUSH (24) - Monitor (12)
- MonitorMixin (12)
-
NEWS for Ruby 2
. 1 . 0 (12) -
NEWS for Ruby 2
. 3 . 0 (10) -
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 2
. 6 . 0 (7) -
NEWS for Ruby 2
. 7 . 0 (6) -
NEWS for Ruby 3
. 0 . 0 (5) -
STATUS
_ STARTED (12) - TCPServer (12)
- [] (84)
- []= (36)
-
add
_ tag (12) -
add
_ word _ pair (12) - at (12)
-
backtrace
_ locations (24) - caller (36)
-
enable
_ starttls _ auto (12) -
end
_ with? (6) - list (12)
-
net
/ http (12) -
net
/ smtp (12) - parse (12)
-
read
_ body (24) - ready (12)
-
respond
_ to? (12) - result (7)
-
rexml
/ parsers / sax2parser (12) -
rexml
/ parsers / streamparser (12) -
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 4 feature (12) -
send
_ mail (12) - sendmail (12)
-
start
_ with? (6) - started (12)
- started? (12)
-
starttls
_ auto? (12) -
stop
_ doc (12) - strptime (12)
-
to
_ ary (12) - today (24)
-
total
_ time (12) -
trace
_ object _ allocations _ stop (12) - セキュリティモデル (5)
検索結果
先頭5件
-
GetoptLong
:: STATUS _ STARTED -> 1 (9100.0) -
内部状態を管理するための定数です。ユーザが使用することはありません。
内部状態を管理するための定数です。ユーザが使用することはありません。 -
Date
. today(start = Date :: ITALY) -> Date (6207.0) -
現在の日付に相当する日付オブジェクトを生成します。
...現在の日付に相当する日付オブジェクトを生成します。
@param start グレゴリオ暦をつかい始めた日をあらわすユリウス日
//emlist[例][ruby]{
require 'date'
Date.today # => #<Date: 2017-09-20 ...>
//}... -
DateTime
. today(start = Date :: ITALY) -> Date (6207.0) -
このクラスでは利用できません。
...このクラスでは利用できません。
DateTime.now を参照してください。
@param start グレゴリオ暦をつかい始めた日をあらわすユリウス日... -
Object
# respond _ to?(name , include _ all = false) -> bool (6155.0) -
オブジェクトがメソッド name を持つとき真を返します。
...ソッドで NotImplementedError が発生する場合は true を返します。
メソッドが定義されていない場合は、Object#respond_to_missing? を呼
び出してその結果を返します。
@param name Symbol または文字列で指定するメソッド名です。
@param inc......|it| puts it.hello if it.respond_to?(:hello)}
#=> Bonjour
list.each{|it| it.instance_eval("puts hello if it.respond_to?(:hello, true)")}
#=> Bonjour
# Guten Tag
module Template
def main
start
template_method
finish
end
def start
puts "start"
end
def template_method......nd_to?(:template_method) # => true
# NotImplementedError が発生しているが、Rubyによる実装部のため true を返す
puts NotImplTemplateMethod.new.respond_to?(:template_method) # => true
# GNU/Linux で実行。C言語による実装部のため false を返す
puts File.respond_to?(:... -
Symbol
# start _ with?(*prefixes) -> bool (6143.0) -
self の先頭が prefixes のいずれかであるとき true を返します。
...を返します。
(self.to_s.start_with?と同じです。)
@param prefixes パターンを表す文字列または正規表現 (のリスト)
@see Symbol#end_with?
@see String#start_with?
//emlist[][ruby]{
:hello.start_with?("hell") #=> true
:hello.start_with?(/H/i)......#=> true
# returns true if one of the prefixes matches.
:hello.start_with?("heaven", "hell") #=> true
:hello.start_with?("heaven", "paradise") #=> false
//}... -
RDoc
:: CodeObject # stop _ doc -> () (6122.0) -
以降に解析したコメントを RDoc::CodeObject#start_doc を呼び出すま での間、ドキュメントに含めません。
...トを RDoc::CodeObject#start_doc を呼び出すま
での間、ドキュメントに含めません。
:stopdoc: を見つけた時に呼び出されます。
RDoc::CodeObject#document_self と
RDoc::CodeObject#document_children を false に設定します。
@see RDoc::CodeObject#start_doc... -
ObjectSpace
. # trace _ object _ allocations _ stop -> nil (6112.0) -
オブジェクト割り当てのトレースを終了します。
...オブジェクト割り当てのトレースを終了します。
トレースを終了する為には、ObjectSpace.#trace_object_allocations_startを呼んだ回数分だけこのメソッドを呼ぶ必要があります。
@see ObjectSpace.#trace_object_allocations_start... -
GC
:: Profiler . total _ time -> Float (6106.0) -
GC のプロファイル情報から GC の総計時間を計算し、msec 単位で返します。
...GC のプロファイル情報から GC の総計時間を計算し、msec 単位で返します。
//emlist[例][ruby]{
GC::Profiler.enable
GC.start
GC::Profiler.total_time # => 0.0011530000000000012
//}... -
MonitorMixin (6018.0)
-
スレッドの同期機構としてのモニター機能を提供するモジュールです。
...[消費者、生産者問題の例][ruby]{
require 'monitor'
buf = []
buf.extend(MonitorMixin) # 配列にモニタ機能を追加
empty_cond = buf.new_cond # 配列が空であるかないかを通知する条件変数
# consumer
Thread.start do
loop do
buf.synchronize do # ロックする......期化
MonitorMixin は初期化される必要があります。
上の例のように Object#extend を使って利用する場合は
自動的に初期化されます。
//emlist[extend する例][ruby]{
require 'monitor'
buf = []
buf.extend(MonitorMixin)
//}
しかし、MonitorMixin をクラ......ぶ必要があります。
//emlist[include する例][ruby]{
require 'monitor'
class MyObject
include MonitorMixin
def initialize(val)
super()
@value = val
end
def to_s
synchronize {
@value.to_s
}
end
end
//}
以下も参考になります。
* 9384
* 9386... -
Monitor (6006.0)
-
スレッドの同期機構としてのモニター機能を提供するクラスです。 また同じスレッドから何度も lock できる Mutex としての機能も提供します。
...能も提供します。
MonitorMixin を include し、いくつかの別名を定義したクラスです。
=== 例
//emlist[消費者、生産者問題の例][ruby]{
require 'monitor'
buf = []
mon = Monitor.new
empty_cond = mon.new_cond
# consumer
Thread.start do
loop do
mon.synchroni......//}
2回ロックしてもデッドロックにならない例です。
//emlist[デッドロックにならない例][ruby]{
require 'monitor'
mon = Monitor.new
mon.synchronize {
mon.synchronize {
}
}
//}
Thread::Mutex ではデッドロックになります。
//emlist[Mutex でデッド...