種類
ライブラリ
- English (44)
- ビルトイン (277)
-
cgi
/ core (22) - csv (33)
- erb (22)
- expect (22)
- forwardable (11)
-
io
/ wait (33) -
irb
/ context (11) -
irb
/ output-method (22) - mkmf (11)
- monitor (14)
-
net
/ ftp (22) -
net
/ http (83) -
net
/ imap (22) - open3 (44)
- openssl (77)
- pp (11)
- prettyprint (44)
- rake (11)
- readline (11)
- resolv (11)
-
rexml
/ document (121) - rss (110)
-
rubygems
/ package / tar _ output (22) -
rubygems
/ user _ interaction (33) - shell (15)
-
shell
/ filter (18) -
shell
/ process-controller (6) - socket (74)
- stringio (44)
- thread (2)
- timeout (41)
-
webrick
/ log (11) - win32ole (44)
- zlib (77)
クラス
-
ARGF
. class (22) - Array (19)
- CGI (22)
-
CGI
:: Cookie (11) - CSV (33)
- ERB (22)
-
Encoding
:: Converter (11) - File (11)
-
Gem
:: Package :: TarOutput (22) -
Gem
:: StreamUI :: SilentProgressReporter (11) -
Gem
:: StreamUI :: SimpleProgressReporter (11) -
Gem
:: StreamUI :: VerboseProgressReporter (11) - IO (117)
-
IRB
:: Context (11) -
IRB
:: OutputMethod (11) -
IRB
:: StdioOutputMethod (11) - MatchData (22)
- Monitor (3)
-
MonitorMixin
:: ConditionVariable (11) - Mutex (2)
-
Net
:: FTP (22) -
Net
:: HTTP (83) -
Net
:: IMAP (11) -
Net
:: IMAP :: Address (11) - Object (11)
-
OpenSSL
:: SSL :: SSLContext (44) -
OpenSSL
:: SSL :: Session (22) - PP (11)
- PrettyPrint (44)
-
RDoc
:: Options (22) -
REXML
:: AttlistDecl (11) -
REXML
:: Attribute (11) -
REXML
:: Declaration (11) -
REXML
:: DocType (11) -
REXML
:: Document (22) -
REXML
:: Element (11) -
REXML
:: Entity (11) -
REXML
:: ExternalEntity (11) -
REXML
:: Formatters :: Default (11) -
REXML
:: NotationDecl (11) -
RSS
:: ImageFaviconModel :: ImageFavicon (22) -
RSS
:: ImageItemModel :: ImageItem (22) -
RSS
:: RDF :: Channel :: ImageFavicon (22) -
RSS
:: TaxonomyTopicModel :: TaxonomyTopic (22) -
Rake
:: Application (11) -
Resolv
:: DNS (11) - Shell (15)
-
Shell
:: Filter (18) -
Shell
:: ProcessController (6) - Socket (44)
- String (22)
- StringIO (44)
- TCPSocket (8)
-
Thread
:: ConditionVariable (11) -
Thread
:: Mutex (9) -
WEBrick
:: BasicLog (11) -
WIN32OLE
_ EVENT (11) -
WIN32OLE
_ PARAM (33) -
Zlib
:: GzipReader (11) -
Zlib
:: Inflate (11) -
Zlib
:: ZStream (44)
モジュール
-
GC
:: Profiler (11) - Kernel (143)
- Open3 (44)
-
OpenSSL
:: X509 (11) -
RSS
:: RootElementMixin (22) - Readline (11)
-
Socket
:: Constants (22) - Timeout (19)
キーワード
-
$ CHILD _ STATUS (11) -
$ DEFAULT _ OUTPUT (11) -
$ OUTPUT _ FIELD _ SEPARATOR (11) -
$ OUTPUT _ RECORD _ SEPARATOR (11) -
$ stdout (11) - << (11)
- > (6)
- >> (6)
-
IP
_ ROUTER _ ALERT (22) - Ruby用語集 (11)
-
SO
_ OOBINLINE (22) - SingleForwardable (11)
-
V
_ ERR _ OUT _ OF _ MEM (11) - ZStream (11)
- about (44)
- about= (44)
-
add
_ gem _ contents (11) -
avail
_ out (11) -
avail
_ out= (11) - begin (11)
-
block
_ output _ synchronize (6) - chmod (11)
-
continue
_ timeout (11) -
cpp
_ command (11) -
debug
_ output _ exclusive _ unlock (3) -
debug
_ output _ synchronize (6) -
debug
_ output _ unlock (6) - display (11)
- end (11)
- expect (22)
- fatal (11)
- filter (33)
-
flush
_ next _ out (11) -
force
_ output (11) -
force
_ output= (11) - format (11)
- header (11)
- input? (11)
-
insert
_ output (11) -
keep
_ alive _ timeout (11) -
keep
_ alive _ timeout= (11) - logout (11)
- new (92)
-
on
_ event _ with _ outargs (11) - open (15)
-
open
_ timeout (22) - output= (11)
- output? (11)
-
output
_ encoding (11) -
output
_ encoding= (11) - pack (19)
- pack テンプレート文字列 (11)
-
pipeline
_ r (11) -
pipeline
_ rw (11) -
pipeline
_ w (22) - pread (7)
- print (11)
- printn (11)
-
rb
_ define _ class _ under (11) -
rb
_ define _ module _ under (11) -
rb
_ thread _ select (1) - read (22)
-
read
_ nonblock (33) -
read
_ timeout (22) - readpartial (44)
- report (11)
- retval? (11)
- route (11)
-
rubygems
/ security (11) - select (22)
-
set
_ eoutvar (11) -
singleline
_ format (11) -
singleline
_ pp (11) - sleep (11)
- spawn (44)
-
ssl
_ timeout (22) -
ssl
_ timeout= (22) - sysread (22)
- tcp (22)
- timeout (63)
- timeout= (22)
- timeouts= (11)
-
to
_ f (11) -
total
_ out (11) -
tty
_ output= (11) - unpack (11)
- wait (33)
-
wait
_ for _ cond (3) -
wait
_ readable (11) -
wait
_ writable (11) - write (121)
-
write
_ timeout (6)
検索結果
先頭5件
- Shell
:: Filter # out(dev = STDOUT , &block) -> () - PrettyPrint
. singleline _ format(output = & # 39;& # 39; , maxwidth = 79 , newline = "\n" , genspace = lambda{|n| & # 39; & # 39; * n}) {|pp| . . . } -> object - CGI
# out(options = "text / html") { . . . . } - OpenSSL
:: SSL :: SSLContext # ssl _ timeout -> Integer | nil - OpenSSL
:: SSL :: SSLContext # ssl _ timeout=(seconds)
-
Shell
:: Filter # out(dev = STDOUT , &block) -> () (24319.0) -
Shell#transact を呼び出しその結果を dev に出力します。
...hell#transact を呼び出しその結果を dev に出力します。
@param dev 出力先をIO オブジェクトなどで指定します。
@param block transact 内部で実行するシェルを指定します。
使用例:
require 'shell'
Shell.def_system_command("head")
sh = Shell.n......ew
File.open("out.txt", "w"){ |fp|
sh.out(fp) {
system("ls", "-l") | head("-n 3")
}
}... -
PrettyPrint
. singleline _ format(output = & # 39;& # 39; , maxwidth = 79 , newline = "\n" , genspace = lambda{|n| & # 39; & # 39; * n}) {|pp| . . . } -> object (21500.0) -
PrettyPrint オブジェクトを生成し、それを引数としてブロックを実行します。 PrettyPrint.format に似ていますが、改行しません。
...PrettyPrint オブジェクトを生成し、それを引数としてブロックを実行します。
PrettyPrint.format に似ていますが、改行しません。
引数 maxwidth, newline と genspace は無視されます。ブロック中の breakable の実行は、
改行せずに text......の実行であるかのように扱います。
@param output 出力先を指定します。output は << メソッドを持っていなければなりません。
@param maxwidth 無視されます。
@param newline 無視されます。
@param genspace 無視されます。... -
CGI
# out(options = "text / html") { . . . . } (21319.0) -
HTTP ヘッダと、ブロックで与えられた文字列を標準出力に出力します。
...t が "iso-2022-jp"・"euc-jp"・"shift_jis" のいずれかで
ある場合は文字列エンコーディングを自動変換し、language を "ja"にします。
@param options Hash か文字列で HTTP ヘッダを生成するための情報を指定します。
例:
cgi = CGI.new......cgi.out{ "string" }
# Content-Type: text/html
# Content-Length: 6
#
# string
cgi.out("text/plain"){ "string" }
# Content-Type: text/plain
# Content-Length: 6
#
# string
cgi.out({"nph" => t......"connection" => "close",
"type" => "text/html",
"charset" => "iso-2022-jp",
# Content-Type: text/html; charset=iso-2022-jp
"language" => "ja",
"expires" => Time.now + (3600 * 24 * 30... -
OpenSSL
:: SSL :: SSLContext # ssl _ timeout -> Integer | nil (21300.0) -
このコンテキストから生成するセッションのタイムアウト秒数を返します。
...このコンテキストから生成するセッションのタイムアウト秒数を返します。
デフォルト値は nil です。
@see OpenSSL::SSL::SSLContext#timeout=... -
OpenSSL
:: SSL :: SSLContext # ssl _ timeout=(seconds) (21300.0) -
このコンテキストから生成するセッションのタイムアウト秒数を設定します。
...このコンテキストから生成するセッションのタイムアウト秒数を設定します。
nil を指定すると OpenSSL のデフォルトのタイムアウト秒数(300秒)を用います。
@param seconds タイムアウト秒数(整数)
@see OpenSSL::SSL::Session#timeout... -
Shell
:: ProcessController . block _ output _ synchronize { . . . } -> () (21300.0) -
@todo
@todo -
PP
. singleline _ pp(obj , out= $ >) -> object (18439.0) -
指定されたオブジェクト obj を出力先 out に出力します。 ただし、インデントも改行もしません。 出力先 out を返します。
...指定されたオブジェクト obj を出力先 out に出力します。
ただし、インデントも改行もしません。
出力先 out を返します。
@param obj 表示したいオブジェクトを指定します。
@param out 出力先を指定します。<< メソッドが定義... -
Socket
:: Constants :: SO _ OOBINLINE -> Integer (18416.0) -
Leave received out-of-band data in-line。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。
...Leave received out-of-band data in-line。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。
@see sys/socket.h(header), getsockopt(2freebsd),
socket(7linux), Socket::Constants::SOL_SOCKET... -
Socket
:: SO _ OOBINLINE -> Integer (18416.0) -
Leave received out-of-band data in-line。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。
...Leave received out-of-band data in-line。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。
@see sys/socket.h(header), getsockopt(2freebsd),
socket(7linux), Socket::Constants::SOL_SOCKET... -
Timeout
. # timeout(sec , exception _ class = nil) {|i| . . . } -> object (18308.0) -
ブロックを sec 秒の期限付きで実行します。 ブロックの実行時間が制限を過ぎたときは例外 Timeout::Error が発生します。
...を過ぎたときは例外
Timeout::Error が発生します。
exception_class を指定した場合には Timeout::Error の代わりに
その例外が発生します。
ブロックパラメータ i は sec がはいります。
また sec が 0 もしくは nil のときは制限時間なし......ption_class タイムアウトした時、発生させる例外を指定します.
@param message エラーメッセージを指定します.省略した場合は
"execution expired" になります.
例 長い計算のタイムアウト
require 'timeout'
def calc_pi(min)
lo......+ y**2 < 1.0 ? min[0] += 1 : min[1] += 1
end
end
t = 5
min = [ 0, 0]
begin
Timeout.timeout(t){
calc_pi(min)
}
rescue Timeout::Error
puts "timeout"
end
printf "%d: pi = %f\n", min[0] + min[1], min[0]*4.0/(min[0]+min[1])
#例
#=> 417519: pi = 3.141443
例... -
Timeout
. # timeout(sec , exception _ class , message) {|i| . . . } -> object (18308.0) -
ブロックを sec 秒の期限付きで実行します。 ブロックの実行時間が制限を過ぎたときは例外 Timeout::Error が発生します。
...を過ぎたときは例外
Timeout::Error が発生します。
exception_class を指定した場合には Timeout::Error の代わりに
その例外が発生します。
ブロックパラメータ i は sec がはいります。
また sec が 0 もしくは nil のときは制限時間なし......ption_class タイムアウトした時、発生させる例外を指定します.
@param message エラーメッセージを指定します.省略した場合は
"execution expired" になります.
例 長い計算のタイムアウト
require 'timeout'
def calc_pi(min)
lo......+ y**2 < 1.0 ? min[0] += 1 : min[1] += 1
end
end
t = 5
min = [ 0, 0]
begin
Timeout.timeout(t){
calc_pi(min)
}
rescue Timeout::Error
puts "timeout"
end
printf "%d: pi = %f\n", min[0] + min[1], min[0]*4.0/(min[0]+min[1])
#例
#=> 417519: pi = 3.141443
例...