るりまサーチ

最速Rubyリファレンスマニュアル検索!
66件ヒット [1-66件を表示] (0.045秒)
トップページ > クエリ:new[x] > クエリ:path[x] > クエリ:Cookie[x]

別のキーワード

  1. openssl new
  2. _builtin new
  3. rexml/document new
  4. resolv new
  5. socket new

種類

ライブラリ

クラス

キーワード

検索結果

NEWS for Ruby 2.1.0 (26030.0)

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

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

それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス...
...location_class_path
* 追加: ObjectSpace.#allocation_method_id
* 追加: ObjectSpace.#allocation_generation
* 追加: ObjectSpace.#reachable_objects_from_root
* 追加: ObjectSpace.#dump
* 追加: ObjectSpace.#dump_all

* OpenSSL::BN
* 拡張: OpenSSL::BN.new Fixnum や Bi...
...

* open-uri
* 複数フィールドに同じ名前を使うことをサポートしました (Set-Cookieのように)

* Pathname
* 追加: Pathname#write
* 追加: Pathname#binwrite

* rake
* 10.1.0 に更新しました。古い名前空間を削除しました。また...

ruby 1.8.4 feature (23276.0)

ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。

...ruby]: ruby インタプリタの変更
# * [api]: 拡張ライブラリ API
# * [lib]: ライブラリ
* レベル
* [bug]: バグ修正
* [new]: 追加されたクラス/メソッドなど
* [compat]: 変更されたクラス/メソッドなど
* 互換性のある変更
* on...
...path.rb (test_dirname, test_basename): follow new
# spec. and add new tests.

UNCパスに対するFile.dirname・File.basename・File.splitの仕様
を変更した(UNCをサポートするプラットフォームのみ)。

File.split("//aaa") #=> old: ["//", "aaa"] new...
...): the value of Set-Cookie:
# header field should be splited into each cookie. [ruby-Bugs:2199]
#
# * lib/webrick/cookie.rb (WEBrick::Cookie.parse_set_cookie): new method
# to parse the value of Set-Cookie: header field.
#
# * test/webrick/test_cookie.rb, test/webrick/te...

CGI::Cookie.new(name = "", *value) -> CGI::Cookie (21400.0)

クッキーオブジェクトを作成します。

...す。

: name
クッキーの名前を指定します。必須。
: value
クッキーの値、または値のリストを指定します。
: path
このクッキーを適用するパスを指定します。デフォルトはこの CGI スクリプトのベースディレクトリです。
:...
...のリストを一つ以上指定します。

例:
cookie
1 = CGI::Cookie.new("name", "value1", "value2", ...)
cookie
1 = CGI::Cookie.new({"name" => "name", "value" => "value"})
cookie
1 = CGI::Cookie.new({'name' => 'name',
'val...
...ue' => ['value1', 'value2', ...],
'path' => 'path', # optional
'domain' => 'domain', # optional
'expires' => Time.now, # optional
'secure' =>...

CGI::Cookie (18192.0)

クッキーを表すクラスです。

...例:
cookie
1 = CGI::Cookie.new("name", "value1", "value2", ...)
cookie
1 = CGI::Cookie.new({"name" => "name", "value" => "value"})
cookie
1 = CGI::Cookie.new({'name' => 'name',
'value' => ['value1', 'value2', ...],
'path'...
...i.out({"cookie" => [cookie1, cookie2]}){ "string" }

name = cookie1.name
values = cookie1.value
path
= cookie1.path
domain = cookie1.domain
expires = cookie1.expires
secure = cookie1.secure
httponly = cookie1.httponly

cookie
1.name = 'name'
cookie
1.value...
...= ['value1', 'value2', ...]
cookie
1.path = 'path'
cookie
1.domain = 'domain'
cookie
1.expires = Time.now + 30
cookie
1.secure = true
cookie
1.httponly = true

@see 2965...

cgi (228.0)

CGI プログラムの支援ライブラリです。

...) Version 1.1
* https://www.w3.org/CGI/

=== 使用例

==== フォームフィールドの値を得る

//emlist[][ruby]{
require "cgi"
cgi = CGI.new
values = cgi['field_name'] # <== 'field_name' の配列
# 'field_name' が指定されていなかったら、 ""を返す。
fields = cgi.keys...
...y]{
require "cgi"
cgi = CGI.new
value = cgi.params['field_name'][0] # TempFile オブジェクト(10240バイト未満の場合は StringIOオブジェクト)
value.read # 本文(送られてきたファイルの中身)
value.local_path # ロ...
...gi = CGI.new
for name, cookie in cgi.cookies
cookie
.expires = Time.now + 30
end
cgi.out("cookie" => cgi.cookies){"string"}

cgi.cookies # { "name1" => cookie1, "name2" => cookie2, ... }

require "cgi"
cgi = CGI.new
cgi.cookies['name'].expires = Time.now + 30
cgi.out("cookie" => cgi.cookies['name']...

絞り込み条件を変える

webrick/cgi (84.0)

一般の CGI 環境で webrick ライブラリのサーブレットと同じように CGI スクリプトを書くための ライブラリです。サーバが WEBrick でなくても使うことが出来ます。

...ss MyCGI < WEBrick::CGI
def do_GET(req, res)
res["content-type"] = "text/plain"
ret = "hoge\n"
res.body = ret
end
end

MyCGI.new.start()

==== do_XXX メソッド

do_XXX メソッドの XXX には GET, HEAD, POST, PUT, DELETE, OPTIONS が使用できます。

WEBrick::CGI...
...end
MyCGI.new.start()


==== クライアントにクッキーを渡す

require "webrick/cgi"
class MyCGI < WEBrick::CGI
def do_GET(req, res)
c1 = WEBrick::Cookie.new("name1", "val1")
c1.expires = Time.now + 30
res.cookies << c1

c2 = WEBrick::Cookie.new("name2", "v...
...class MyCGI < WEBrick::CGI
def do_GET(req, res)
req.content_length
req.content_type
req.path_info
req.query_string
req.peeraddr
req.host
req.user
req.request_method
req.script_name
req.port
end
end
MyCGI.new.start()

=== リンク

* 3875...