るりまサーチ

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

別のキーワード

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

ライブラリ

クラス

キーワード

検索結果

ruby 1.6 feature (23282.0)

ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。

...00019>))

: 2002-09-11: Queue#((<Queue/pop>))

Queue#pop に競合状態の問題がありました ((<ruby-dev:17223>))

: 2002-09-11: SizedQueue.new

引数に 0 以下を受けつけるバグが修正されました。

: 2002-09-05: ((<リテラル/式展開>))

stable snapshot で、一...
...を返していた
p "foo".slice!(5,10)

=> ruby 1.6.7 (2002-03-01) [i586-linux]
nil
-:2:in `slice!': index 5 out of string (IndexError)
from -:2
=> ruby 1.6.7 (2002-08-01) [i586-linux]
nil
nil

: 2002-07-05 String#...
...として英数字を指定
できなくなりました。

p %q1..1

=> ruby 1.6.5 (2001-10-10) [i586-linux]
".."
=> -:1: unknown type of %string
p %q1..1
^
ruby 1.6.5 (2001-10-15) [i586-linux]

: String#=~

String#=~ の呼出で両辺と...

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

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

...一つ以上指定します。

例:
cookie1 = CGI::Cookie.new("name", "value1", "value2", ...)
cookie1 = CGI::Cookie.new({"name" => "name", "value" => "value"})
cookie1 = CGI::Cookie.new({'name' => 'name',
'value' => ['va...
...'expires' => Time.now, # optional
'secure' => true # optional
'httponly' => true # optional
})

cgi.out({"cookie" => [cookie1, cookie2]}){ "string"...
...httponly = cookie1.httponly

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

CGI#out(options = "text/html") { .... } (18131.0)

HTTP ヘッダと、ブロックで与えられた文字列を標準出力に出力します。

...= CGI.new
cgi.out{ "string" }
# Content-Type: text/html
# Content-Length: 6
#
# string

cgi.out("text/plain"){ "string" }
# Content-Type: text/plain
# Content-Length: 6
#
# string

cgi.out({"nph"...
...-jp",
# Content-Type: text/html; charset=iso-2022-jp
"language" => "ja",
"expires" => Time.now + (3600 * 24 * 30),
"cookie" => [cookie1, cookie2],
"my_header1" => "my_value",
"my_header2"...

cgi (156.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...
...uire "cgi"
cgi = 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.coo...
...kies['name']){"string"}
//}

==== クライアントからクッキーを得る

//emlist[][ruby]{
require "cgi"
cgi = CGI.new
values = cgi.cookies['name'] # values は name クッキーの値の配列。
# name クッキーが存在しない場合は空配列を返す...

CGI#header(options = "text/html") -> String (44.0)

HTTP ヘッダを options に従って生成します。 CGI#out と違い、標準出力には出力しません。 CGI#out を使わずに自力で HTML を出力したい場合などに使います。 このメソッドは文字列エンコーディングを変換しません。

...HTTP ヘッダを options に従って生成します。 CGI#out と違い、標準出力には出力しません。
CGI#out を使わずに自力で HTML を出力したい場合などに使います。
このメソッドは文字列エンコーディングを変換しません。

ヘッダのキ...
..."language" => "ja",
"expires" => Time.now + 30,
"cookie" => [cookie1, cookie2],
"my_header1" => "my_value",
"my_header2" => "my_value"})

例:
cgi = CGI.new('html3')
print cgi.header({"charset" => "shift_jis"...

絞り込み条件を変える

CGI::Cookie (36.0)

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

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

例:
cookie1 = CGI::Cookie.new("name", "value1", "value2", ...)
cookie1 = CGI::Cookie.new({"name" => "name", "value" => "value"})
cookie1 = CGI::Cookie.new({'name' => 'name',
'value' => ['value1', 'value2', ...],...
...ptional
'expires' => Time.now, # optional
'secure' => true # optional
'httponly' => true # optional
})

cgi.out({"cookie" => [cookie1, cookie2]}){ "string" }

name...
...secure = cookie1.secure
httponly = cookie1.httponly

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

@see 2965...

CSV (24.0)

このクラスは CSV ファイルやデータに対する完全なインターフェイスを提供します。

...{ |csv_out| csv_out << %w{my data here} } # to $stdout
CSV(csv = "") { |csv_str| csv_str << %w{my data here} } # to a String
CSV($stderr) { |csv_err| csv_err << %w{my data here} } # to $stderr
//}

=== CSV と文字エンコーディング (M17n or Multilingualization)

This new CSV parse...
...o avoid the translation.

It's also important to note that while all of CSV's core parser is now
Encoding agnostic, some features are not. For example, the built-in
converters will try to transcode data to UTF-8 before making conversions.
Again, you can provide custom converters that are aware of y...
...ssed into CSV have the proper Encoding set and everything should just work.
CSV methods that allow you to open IO objects (CSV::foreach(), CSV::open(),
CSV::read(), and CSV::readlines()) do allow you to specify the Encoding.

One minor exception comes when generating CSV into a String with an Encodi...