39件ヒット
[1-39件を表示]
(0.016秒)
種類
- ライブラリ (27)
- インスタンスメソッド (12)
ライブラリ
-
net
/ http (12)
クラス
-
Net
:: HTTPResponse (12)
キーワード
- drb (12)
-
rdoc
/ generator / json _ index (12) - xmlrpc (3)
検索結果
-
Net
:: HTTPResponse # code -> String (18113.0) -
HTTP のリザルトコードです。例えば '302' などです。
...スオブジェクトがどのクラスのインスタンスかを
見ることでもレスポンスの種類を判別できます。
//emlist[例][ruby]{
require 'net/http'
uri = "http://www.example.com/index.html"
response = Net::HTTP.get_response(URI.parse(uri))
response.code # => "200"
//}... -
rdoc
/ generator / json _ index (6024.0) -
他のジェネレータが生成する HTML で検索が行えるように、JSON の検索インデッ クスを生成するサブライブラリです。
...tim code written by him.
このジェネレータは HTML ジェネレータと一緒に使うために設計されています。:
class RDoc::Generator::Darkfish
def initialize options
# ...
@base_dir = Pathname.pwd.expand_path
@json_index = RDoc::Generator::JsonIndex.ne......_index.generate
end
end
=== インデックスフォーマット
検索用のインデックスは JSON ファイルに出力されます。search_data という
グローバル変数に以下のような内容で出力されます。
var search_data = {
"index": {
"searchIndex"......:
["a", "b", ...],
"longSearchIndex":
["a", "a::b", ...],
"info": [
["A", "A", "A.html", "", ""],
["B", "A::B", "A::B.html", "", ""],
...
]
}
}
searchIndex、longSearchIndex、info 中の情報は同じ位置にあるものは同じ要... -
xmlrpc (18.0)
-
XML-RPC を扱うためのライブラリです。
...' enables you to create a server that
implements remote procedures and a client that calls them. Very little code
is required to achieve either of these.
=== Example
Try the following code. It calls a standard demonstration remote procedure.
require 'xmlrpc/client'
require 'pp'
server =......XMLTreeParser.
You can change the XML-writer by calling method <i>set_writer</i>.
=== 参考
* http://www.linux.or.jp/JF/JFdocs/XML-RPC-HOWTO/index.html
* http://www.linux.or.jp/JF/JFdocs/XML-RPC-HOWTO/xmlrpc-howto-ruby.html
* [XML-RPC] http://www.xmlrpc.com/spec
* https://magazine.rubyi... -
drb (12.0)
-
分散オブジェクトプログラミングのためのライブラリです。
...呼ぶため
# ローカルオブジェクトの instance_eval を取り除く
undef :instance_eval
end
ro.instance_eval("DANGEROUS RUBY CODE!")
このような instance_eval による危険性は $SAFE を 1
以上にすることで防げます。
DRb.#start_service の :safe_level オ......すべきです。
=== リファレンス
* http://www2a.biglobe.ne.jp/~seki/ruby/druby.html
* http://www.ruby-doc.org/stdlib/libdoc/drb/rdoc/index.html
=== Example
単純なクライアント-サーバシステムの例。
ターミナルを2つサーバ側/クライアント側として起......呼ぶため
# ローカルオブジェクトの instance_eval を取り除く
undef :instance_eval
end
ro.instance_eval("DANGEROUS RUBY CODE!")
このような instance_eval による危険性は $SAFE を 1
にすることで防げます。
DRb.#start_service の :safe_level オプシ...