60件ヒット
[1-60件を表示]
(0.063秒)
別のキーワード
ライブラリ
- ビルトイン (12)
-
net
/ http (24) -
rexml
/ document (24)
クラス
-
Net
:: HTTP (24) - Proc (12)
-
REXML
:: Instruction (24)
キーワード
- content (12)
- post (24)
-
source
_ location (12)
検索結果
先頭5件
-
REXML
:: Instruction # target -> String (21250.0) -
XML 処理命令のターゲットを返します。
...ます。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/css" href="style.css"?>
<root />
EOS
doc[2] # => <?p-i xml-stylesheet ...?>
doc[2].target # => "xml-stylesheet"
doc[2].content # => "type=\"text/... -
REXML
:: Instruction # content -> String | nil (9255.0) -
XML 処理命令の内容を返します。
...。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/css" href="style.css"?>
<?foobar?>
<root />
EOS
doc[2] # => <?p-i xml-stylesheet ...?>
doc[2].target # => "xml-stylesheet"
doc[2].content # => "type=\"......text/css\" href=\"style.css\""
doc[4].target # => "foobar"
doc[4].content # => nil
//}... -
Proc
# source _ location -> [String , Integer] | nil (6243.0) -
ソースコードのファイル名と行番号を配列で返します。
...クトが ruby で定義されていない(つまりネイティブ
である)場合は nil を返します。
//emlist[例][ruby]{
# /path/to/target.rb を実行
proc {}.source_location # => ["/path/to/target.rb", 1]
proc {}.source_location # => ["/path/to/target.rb", 2]
(ev......al "proc {}").source_location # => ["(eval)", 1]
method(:p).to_proc.source_location # => nil
//}
@see Method#source_location... -
Net
:: HTTP # post(path , data , header = nil , dest = nil) -> Net :: HTTPResponse (315.0) -
サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。
...送ります。
返り値は Net::HTTPResponse のインスタンスです。
ブロックと一緒に呼びだされたときはエンティティボディを少しずつ文字列として
ブロックに与えます。このとき戻り値の HTTPResponse オブジェクトは有効な body を......持ちません。
POST する場合にはヘッダに Content-Type: を指定する必要があります。
もし header に指定しなかったならば、 Content-Type として
"application/x-www-form-urlencoded" を用います。
dest は時代遅れの引数です。利用しないでく......[ruby]{
# net/http version 1.1
response, body = http.post('/cgi-bin/search.rb', 'query=subject&target=ruby')
# version 1.2
response = http.post('/cgi-bin/search.rb', 'query=subject&target=ruby')
# using block
File.open('save.html', 'w') {|f|
http.post('/cgi-bin/search.rb', 'query=subject&target=... -
Net
:: HTTP # post(path , data , header = nil , dest = nil) {|body _ segment| . . . . } -> Net :: HTTPResponse (315.0) -
サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。
...送ります。
返り値は Net::HTTPResponse のインスタンスです。
ブロックと一緒に呼びだされたときはエンティティボディを少しずつ文字列として
ブロックに与えます。このとき戻り値の HTTPResponse オブジェクトは有効な body を......持ちません。
POST する場合にはヘッダに Content-Type: を指定する必要があります。
もし header に指定しなかったならば、 Content-Type として
"application/x-www-form-urlencoded" を用います。
dest は時代遅れの引数です。利用しないでく......[ruby]{
# net/http version 1.1
response, body = http.post('/cgi-bin/search.rb', 'query=subject&target=ruby')
# version 1.2
response = http.post('/cgi-bin/search.rb', 'query=subject&target=ruby')
# using block
File.open('save.html', 'w') {|f|
http.post('/cgi-bin/search.rb', 'query=subject&target=...