るりまサーチ

最速Rubyリファレンスマニュアル検索!
111件ヒット [1-100件を表示] (0.027秒)

別のキーワード

  1. _builtin file?
  2. _builtin file
  3. file path
  4. file size
  5. file open

検索結果

<< 1 2 > >>

Net::HTTP#post(path, data, header = nil, dest = nil) -> Net::HTTPResponse (18160.0)

サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。

...サーバ上の path にあるエンティティに対し文字列 data を
POST
で送ります。

返り値は Net::HTTPResponse のインスタンスです。

ブロックと一緒に呼びだされたときはエンティティボディを少しずつ文字列として
ブロックに与え...
...ます。このとき戻り値の HTTPResponse オブジェクトは有効な body を
持ちません。

POST
する場合にはヘッダに Content-Type: を指定する必要があります。
もし header に指定しなかったならば、 Content-Type として
"application/x-www-form-urlen...
...y]{
# 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=ruby...

Net::HTTP#post(path, data, header = nil, dest = nil) {|body_segment| .... } -> Net::HTTPResponse (18160.0)

サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。

...サーバ上の path にあるエンティティに対し文字列 data を
POST
で送ります。

返り値は Net::HTTPResponse のインスタンスです。

ブロックと一緒に呼びだされたときはエンティティボディを少しずつ文字列として
ブロックに与え...
...ます。このとき戻り値の HTTPResponse オブジェクトは有効な body を
持ちません。

POST
する場合にはヘッダに Content-Type: を指定する必要があります。
もし header に指定しなかったならば、 Content-Type として
"application/x-www-form-urlen...
...y]{
# 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=ruby...

WEBrick::HTTPServlet::FileHandler#do_POST(request, response) -> () (9117.0)

POST リクエストを処理します。

...
POST
リクエストを処理します。

@param request クライアントからのリクエストを表す WEBrick::HTTPRequest オブジェクトです。

@param response クライアントへのレスポンスを表す WEBrick::HTTPResponse オブジェクトです。

@raise WEBrick::HTTPSta...

クラス/メソッドの定義 (72.0)

クラス/メソッドの定義 * クラス/メソッドの定義: * class * singleton_class * module * method * operator * nest_method * eval_method * singleton_method * class_method * limit * 定義に関する操作: * alias * undef * defined

... File::Constants を include することで、
# File::RDONLY などと書かずに直接 RDONLY と書くことができる。
class File
module Constants
RDONLY = 0
WRONLY = 1
end
include Constants
end

File
.open("foo", File::RDONLY)

# あるいは

include File::Constants
File
.ope...
...n("foo", RDONLY)

# 上記はあくまでも例である。実際の File.open ではより簡便な
# File.open("foo", "r") という形式が使われる
//}

クラス定義式は、最後に評価した式の結果を返します。最後に評価した式
が値を返さない場合は nil を...
...== 1 then
1
else
n * fact(n-1)
end
end
//}

文法:

def メソッド名 ['(' [arg0 ['=' default0]] ... [',' '*' rest_args [, post ...]] [',' key1: [val1]] ... [',' '**'kwrest] [',' '&' block_arg]`)']
式.. (body)
[rescue [error_type,..] [=> evar] [then]...

ruby 1.8.3 feature (66.0)

ruby 1.8.3 feature *((<ruby 1.8 feature>)) *((<ruby 1.8.2 feature>))

...=== 2005-09-19
: FileUtils.remove_entry_secure [lib] [new]
: FileUtils.remove_entry [lib] [new]
: FileUtils.chmod_R [lib] [new]
: FileUtils.chown [lib] [new]
: FileUtils.chown_R [lib] [new]
: FileUtils.commands [lib] [new]
: FileUtils.options...
...[lib] [new]
: FileUtils.have_option? [lib] [new]
: FileUtils.options_of [lib] [new]
: FileUtils.collect_method [lib] [new]

追加。

: FileUtils.rm_r [lib] [compat]
: FileUtils.rm_rf [lib] [compat]
: FileUtils.cd [lib] [compat]
: FileUtils.cp_r [lib] [compat]...
...-1.8.3 -e 'p File.extname("a.")'
""

=== 2005-09-13
: Logger#formatter [lib] [new]
: Logger#formatter= [lib] [new]
: Logger::Formatter [lib] [new]

追加。

=== 2005-09-13
: Net::HTTP

https での Proxy 認証をサポートするようになりました。

: Net::HTTP.post_form(url, p...

絞り込み条件を変える

net/pop (58.0)

このライブラリは、POP3 (Post Office Protocol version 3) を 用いてPOPサーバからメールを受信する機能を提供するライブラリです。

...このライブラリは、POP3 (Post Office Protocol version 3) を
用いてPOPサーバからメールを受信する機能を提供するライブラリです。

POP3 の実装は 1939 に基いています。

2449 で定義されているPOP3拡張には対応していません。
=== 使用...
...
if pop.mails.empty?
$stderr.puts 'no mail.'
else
pop.mails.each_with_index do |m, idx| # 各メッセージにアクセスする
File
.open("inbox/#{idx + 1}", 'w') {|f|
f.write m.pop
}
m.delete
end
$stderr.puts "#{pop.mails.size} mails popped."
en...
...'YourAccount', 'YourPassword') {|pop|
if pop.mails.empty?
$stderr.puts 'no mail.'
else
pop.mails.each_with_index do |m, idx|
File
.open("inbox/#{idx + 1}", 'w') {|f|
f.write m.pop
}
m.delete
end
$stderr.puts "#{pop.mails.size} mails po...

Net::HTTPGenericRequest#body_stream -> object (42.0)

サーバに送るリクエストのエンティティボディを IO オブジェクトなどのストリームで設定します。 f は read(size) メソッドが定義されている必要があります。

....example.com/index.html')
post
= Net::HTTP::Post.new(uri.request_uri)
File
.open("/path/to/test", 'rb') do |f|
# 大きなファイルを扱う際にメモリ消費を少なくできる
post
.body_stream = f
post
["Content-Length"] = f.size
end
post
.body_stream # => #<File:/path/to/test (closed)>...

Net::HTTPGenericRequest#body_stream=(f) (42.0)

サーバに送るリクエストのエンティティボディを IO オブジェクトなどのストリームで設定します。 f は read(size) メソッドが定義されている必要があります。

....example.com/index.html')
post
= Net::HTTP::Post.new(uri.request_uri)
File
.open("/path/to/test", 'rb') do |f|
# 大きなファイルを扱う際にメモリ消費を少なくできる
post
.body_stream = f
post
["Content-Length"] = f.size
end
post
.body_stream # => #<File:/path/to/test (closed)>...

NEWS for Ruby 3.0.0 (30.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...PERIMENTAL]
16828

//emlist{
case ["a", 1, "b", "c", 2, "d", "e", "f", 3]
in [*pre, String => x, String => y, *post]
p pre #=> ["a", 1]
p x #=> "b"
p y #=> "c"
p post #=> [2, "d", "e", "f", 3]
end
//}

* Endless method definition is added. [EXPERIMENTAL]
16746

//emlist{
de...
...e each second element
# => ["data1", "data2", "data3"]
//}

* Binding
* Binding#eval when called with one argument will use `"(eval)"` for `__FILE__` and `1` for `__LINE__` in the evaluated code. 4352 17419
* ConditionVariable
* ConditionVariable#wait may now invoke the `block`/`unblock`...
..., and will return a frozen copy even if the receiver is unfrozen. 16175
* Kernel#eval when called with two arguments will use `"(eval)"` for `__FILE__` and `1` for `__LINE__` in the evaluated code. 4352
* Kernel#lambda now warns if called without a literal block. 15973
* Kernel.sleep inv...

NEWS for Ruby 2.4.0 (18.0)

NEWS for Ruby 2.4.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...tor::Lazy
* Enumerator::Lazy#chunk_while を追加 https://github.com/ruby/ruby/pull/1186
* Enumerator::Lazy#uniq を追加 11090

* File
* File.empty? を追加 9969

* Float
* Float#ceil, Float#floor, Float#truncate は
Float#roundと同じように省略可能な桁を...
...きるようにしました。 12224
* Logger.new のキーワード引数に shift_period_suffix を追加 10772

* net/http
* Net::HTTP.post を追加 12375

* net/ftp
* TLSをサポート 4217
* Net::FTP.new の引数をキーワード引数に対応しました
* Net::FTP...

絞り込み条件を変える

<< 1 2 > >>