ライブラリ
- ビルトイン (160)
- base64 (24)
-
digest
/ bubblebabble (12) - drb (12)
- erb (48)
- etc (12)
- fileutils (24)
- json (48)
- kconv (84)
- objspace (24)
- open3 (72)
- openssl (324)
- rubygems (12)
-
webrick
/ htmlutils (12) -
webrick
/ httpstatus (12) -
webrick
/ httputils (84) -
webrick
/ utils (24) - zlib (12)
モジュール
- Base64 (24)
- DRb (12)
- Digest (12)
-
ERB
:: Util (48) - Etc (12)
- FileUtils (24)
- Gem (12)
- JSON (48)
- Kconv (84)
- Kernel (134)
- Marshal (24)
- ObjectSpace (24)
- Open3 (72)
-
OpenSSL
:: ASN1 (312) -
OpenSSL
:: Random (12) - Process (2)
-
WEBrick
:: HTMLUtils (12) -
WEBrick
:: HTTPStatus (12) -
WEBrick
:: HTTPUtils (84) -
WEBrick
:: Utils (24) - Zlib (12)
キーワード
- BMPString (24)
- BitString (24)
- Float (7)
- GeneralString (24)
- GraphicString (24)
- IA5String (24)
- ISO64String (24)
- Integer (7)
- NumericString (24)
- OctetString (24)
- PrintableString (24)
- T61String (24)
- UTF8String (24)
- UniversalString (24)
- VideotexString (24)
-
allocation
_ sourcefile (12) - autoload (12)
- autoload? (12)
- bubblebabble (12)
- capture2 (12)
- capture2e (12)
- capture3 (12)
-
count
_ objects _ size (12) - deflate (12)
- dequote (12)
- dump (36)
- escape (24)
- escape8bit (12)
-
escape
_ path (12) -
fast
_ unparse (12) - format (12)
- getservername (12)
- getwd (12)
- gsub (36)
- h (12)
-
html
_ escape (12) - iseuc (12)
- isutf8 (12)
- kconv (12)
-
mime
_ type (12) - pipeline (12)
-
pipeline
_ r (12) -
pipeline
_ rw (12) -
pretty
_ unparse (12) -
pseudo
_ bytes (12) - pwd (12)
- quote (12)
-
random
_ string (12) -
reason
_ phrase (12) - ruby (12)
- sprintf (12)
- sub (24)
- toeuc (12)
- toutf16 (12)
- toutf32 (12)
- toutf8 (12)
- uname (12)
- unescape (12)
- unparse (12)
-
untrace
_ var (12) - uri (12)
-
url
_ encode (12) -
urlsafe
_ decode64 (12) -
urlsafe
_ encode64 (12) - warmup (2)
検索結果
先頭5件
-
Marshal
. # dump(obj , port , limit = -1) -> IO (6208.0) -
obj を指定された出力先に再帰的に出力します。
...と
例外 TypeError が発生します。
ファイルに書き出せないオブジェクトは以下の通りです。
* 名前のついてない Class/Module オブジェクト。(この場
合は、例外 ArgumentError が発生します。無名クラスについて
は、Module.new......持するもの。具体的には以下のイン
スタンス。Dir, File::Stat, IO とそのサブクラス
File, Socket など。
* MatchData, Data, Method, UnboundMethod,
Proc, Thread, ThreadGroup, Continuation
のインスタンス。
* 特異メソッドを定義したオブジェ......。
//emlist[例][ruby]{
p Marshal.dump(Hash.new {})
# => -:1:in `dump': cannot dump hash with default proc (TypeError)
//}
マーシャルの動作を任意に定義することもできます。
@param obj ダンプする対象のオブジェクトを指定します。
@param port IO かその... -
Kconv
. # iseuc(str) -> bool (6207.0) -
文字列 str が EUC-JP なバイト列として正当であるかどうかを判定します。
...文字列 str が EUC-JP なバイト列として正当であるかどうかを判定します。
@param str 判定対象の文字列
@see String#iseuc... -
Process
. # warmup -> true (6207.0) -
RubyVMにアプリケーションの起動が終了したこと及び、アプリケーションの最適化に適したタイミングであることを通知します。
...RubyVMにアプリケーションの起動が終了したこと及び、アプリケーションの最適化に適したタイミングであることを通知します。
アプリケーションがプリフォークモデルでデプロイされる場合は、最初のフォークが行なわれ......可能性があります。
CRubyではメジャーGCを実行し以下のことをします:
(1) ヒープを圧縮します
(2) GCされなかった全ての新世代オブジェクトを古い世代に昇格します
(3) 全ての文字列のcoderange([m:String#valid_encoding]などで使......の整合性の情報)を事前計算します
(4) すべての空のヒープページを解放し、解放したページ数だけ割当可能なページカウンター(heap_allocatable_pages)を増分します
(5) 空のmallocページを解放するためにmalloc_trimを呼び出します... -
ERB
:: Util . # h(s) -> String (6203.0) -
文字列 s を HTML用にエスケープした文字列を返します。
...HTML用にエスケープした文字列を返します。
文字列 s 中に含まれる &"<> を、実体参照 & " < > にそれぞれ変更した文字列を返します
(CGI.escapeHTMLとほぼ同じです)。
@param s HTMLエスケープを行う文字列
//emlist[例][ruby......]{
require "erb"
include ERB::Util
puts html_escape("is a > 0 & a < 10?")
# is a > 0 & a < 10?
//}... -
FileUtils
. # pwd -> String (6203.0) -
プロセスのカレントディレクトリを文字列で返します。
プロセスのカレントディレクトリを文字列で返します。 -
WEBrick
:: HTTPStatus . # reason _ phrase(code) -> String (6202.0) -
指定された整数が表すステータスコードに対応する reason phrase を表す文字列を返します。
...定された整数が表すステータスコードに対応する reason phrase
を表す文字列を返します。
@param code HTTP のステータスコードを表す整数か文字列を指定します。
require 'webrick'
p WEBrick::HTTPStatus.reason_phrase(304) #=> "Not Modified"... -
Kconv
. # kconv(str , out _ code , in _ code = Kconv :: AUTO) -> String (508.0) -
文字列 str のエンコーディングを out_code に変換したものを 返します。in_code も指定されていたら str のエンコーディングが in_code だとして動作します。
...文字列 str のエンコーディングを out_code に変換したものを
返します。in_code も指定されていたら str のエンコーディングが
in_code だとして動作します。
このメソッドはMIME エンコードされた文字列を展開し、
いわゆる半角......カナを全角に変換します。
これらを変換したくない場合は、 NKF.#nkf を使ってください。
@param str 変換元の文字列
@param out_code 変換後のエンコーディング
@param in_code strのエンコーディング
@see String#kconv... -
Open3
. # pipeline _ rw(*cmds) {|first _ stdin , last _ stdout , wait _ thrs| . . . } -> () (419.0) -
指定したコマンドのリストをパイプで繋いで順番に実行します。最初の コマンドの標準入力に書き込む事も最後のコマンドの標準出力を受けとる事も できます。
...。それぞれのコマンドは
以下のように String か Array で指定します。
commandline にはコマンド全体(例. "nroff -man")を表す
String を指定します。
options には Hash で指定します。
env には......名を表す String を指定します。
1、2、3 は shell 経由で実行されます。
(1) commandline
(2) [commandline, options]
(3) [env, commandline, options]
(4) [env, cmdname, arg1, arg2, ..., options]
(5) [env, [cmdname, argv0], arg1, ..., options]
@return ブロック......equire "open3"
Open3.pipeline_rw("sort", "cat -n") {|stdin, stdout, wait_thrs|
stdin.puts "foo"
stdin.puts "bar"
stdin.puts "baz"
# sortコマンドにEOFを送る。
stdin.close
# stdinに渡した文字列をsortコマンドが並べ替えたものに、cat... -
Open3
. # pipeline _ r(*cmds) {|last _ stdout , wait _ thrs| . . . } -> () (319.0) -
指定したコマンドのリストをパイプで繋いで順番に実行します。最後の コマンドの標準出力を受けとる事ができます。
...。それぞれのコマンドは
以下のように String か Array で指定します。
commandline にはコマンド全体(例. "nroff -man")を表す
String を指定します。
options には Hash で指定します。
env には......名を表す String を指定します。
1、2、3 は shell 経由で実行されます。
(1) commandline
(2) [commandline, options]
(3) [env, commandline, options]
(4) [env, cmdname, arg1, arg2, ..., options]
(5) [env, [cmdname, argv0], arg1, ..., options]
@return ブロック......返します。
例:
require "open3"
Open3.pipeline_r("yes", "head -10") {|r, ts|
p r.read #=> "y\ny\ny\ny\ny\ny\ny\ny\ny\ny\n"
p ts[0].value #=> #<Process::Status: pid 24910 SIGPIPE (signal 13)>
p ts[1].value #=> #<Process::Status: pid 24913 exit 0>
}
@see Open3.#popen3... -
Open3
. # pipeline(*cmds) -> [Process :: Status] (219.0) -
指定したコマンドのリストをパイプで繋いで順番に実行します。
...。それぞれのコマンドは
以下のように String か Array で指定します。
commandline にはコマンド全体(例. "nroff -man")を表す
String を指定します。
options には Hash で指定します。
env には......名を表す String を指定します。
1、2、3 は shell 経由で実行されます。
(1) commandline
(2) [commandline, options]
(3) [env, commandline, options]
(4) [env, cmdname, arg1, arg2, ..., options]
(5) [env, [cmdname, argv0], arg1, ..., options]
@return 実行した......。
例1:
require "open3"
fname = "/usr/share/man/man1/ruby.1.gz"
p Open3.pipeline(["zcat", fname], "nroff -man", "less")
#=> [#<Process::Status: pid 11817 exit 0>,
# #<Process::Status: pid 11820 exit 0>,
# #<Process::Status: pid 11828 exit 0>]
例2:
require "open3"
Ope...