種類
- インスタンスメソッド (23)
- 特異メソッド (7)
- 文書 (5)
- ライブラリ (1)
- モジュール関数 (1)
ライブラリ
- ビルトイン (3)
-
cgi
/ core (3) - csv (3)
-
net
/ http (1) -
net
/ imap (8) - open-uri (5)
-
rdoc
/ markup (1) -
rexml
/ document (2) -
webrick
/ httprequest (1) -
webrick
/ httpresponse (4)
クラス
- CGI (2)
- CSV (3)
-
Encoding
:: Converter (3) -
Net
:: IMAP :: BodyTypeBasic (2) -
Net
:: IMAP :: BodyTypeMessage (2) -
Net
:: IMAP :: BodyTypeText (2) -
Net
:: IMAP :: ContentDisposition (2) -
RDoc
:: Markup (1) -
REXML
:: Instruction (2) -
WEBrick
:: HTTPRequest (1) -
WEBrick
:: HTTPResponse (4)
モジュール
-
CGI
:: QueryExtension (1) - Kernel (1)
-
Net
:: HTTPHeader (1) - OpenURI (1)
-
OpenURI
:: Meta (2) -
OpenURI
:: OpenRead (1)
キーワード
- cgi (1)
-
content
_ encoding (1) -
content
_ id (3) -
content
_ length (1) -
content
_ length= (1) -
content
_ type (5) - description (3)
-
dsp
_ type (1) - filter (3)
- header (1)
- new (3)
- open (1)
-
open
_ uri (1) - out (1)
- param (1)
- read (1)
-
ruby 1
. 6 feature (1) -
ruby 1
. 8 . 2 feature (1) -
ruby 1
. 8 . 3 feature (1) -
ruby 1
. 8 . 4 feature (1) - target (1)
-
to
_ s (1) - 正規表現 (1)
検索結果
先頭5件
-
REXML
:: Instruction # content -> String | nil (81943.0) -
XML 処理命令の内容を返します。
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... -
RDoc
:: Markup # content -> String (72907.0) -
変換する文字列を返します。
変換する文字列を返します。
rdoc ライブラリのデバッグ用途に使用します。
SM::SimpleMarkup#convert の後に実行します。
変換のために加工したオブジェクトを改行で連結したものを返すため、変換前
の文字列と結果が異なる事があります。
@see SM::SimpleMarkup#convert -
CGI
:: QueryExtension # content _ type -> String (45955.0) -
ENV['CONTENT_TYPE'] を返します。
ENV['CONTENT_TYPE'] を返します。 -
WEBrick
:: HTTPResponse # content _ type -> String | nil (45955.0) -
Content-Type ヘッダの値を返します。
Content-Type ヘッダの値を返します。 -
WEBrick
:: HTTPResponse # content _ length -> Integer | nil (45853.0) -
Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。
Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。
: body が String オブジェクトである場合
content_length の値が nil のとき Content-Length ヘッダには
body のサイズが使われます。nil でないとき body の実際のサイズとこの値が同じかどうかの検証は行われません。
: body が IO オブジェクトである場合
content_length の値が nil のとき Content-Length ヘッダはレスポンスに含まれず、IO から全てを読み込ん
でそれをエンティティボ... -
WEBrick
:: HTTPResponse # content _ length=(len) (45853.0) -
Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。
Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。
: body が String オブジェクトである場合
content_length の値が nil のとき Content-Length ヘッダには
body のサイズが使われます。nil でないとき body の実際のサイズとこの値が同じかどうかの検証は行われません。
: body が IO オブジェクトである場合
content_length の値が nil のとき Content-Length ヘッダはレスポンスに含まれず、IO から全てを読み込ん
でそれをエンティティボ... -
OpenURI
:: Meta # content _ type -> String (37069.0) -
対象となるリソースの Content-Type を文字列で返します。Content-Type ヘッダの情報が使われます。 Content-Type ヘッダがない場合は、"application/octet-stream" を返します。
対象となるリソースの Content-Type を文字列で返します。Content-Type ヘッダの情報が使われます。
Content-Type ヘッダがない場合は、"application/octet-stream" を返します。
//emlist[例][ruby]{
require 'open-uri'
open('http://www.ruby-lang.org/') {|f|
p f.content_type #=> "text/html"
}
//} -
Net
:: HTTPHeader # content _ type -> String|nil (37027.0) -
"text/html" のような Content-Type を表す 文字列を返します。
"text/html" のような Content-Type を表す
文字列を返します。
Content-Type: ヘッダフィールドが存在しない場合には nil を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/comments.cgi?post=comment')
req = Net::HTTP::Post.new(uri.request_uri)
req.content_type # => nil
req.content_type = 'multipart/for... -
OpenURI
:: Meta # content _ encoding -> [String] (37021.0) -
対象となるリソースの Content-Encoding を文字列の配列として返します。 Content-Encoding ヘッダがない場合は、空の配列を返します。
対象となるリソースの Content-Encoding を文字列の配列として返します。
Content-Encoding ヘッダがない場合は、空の配列を返します。
例:
//emlist[例][ruby]{
require 'open-uri'
open('http://example.com/f.tar.gz') {|f|
p f.content_encoding #=> ["x-gzip"]
}
//} -
Net
:: IMAP :: BodyTypeBasic # content _ id -> String | nil (36955.0) -
Content-ID の値を文字列で返します。
Content-ID の値を文字列で返します。
@see 2045 -
Net
:: IMAP :: BodyTypeMessage # content _ id -> String | nil (36955.0) -
Content-ID の値を文字列で返します。
Content-ID の値を文字列で返します。
@see 2045 -
Net
:: IMAP :: BodyTypeText # content _ id -> String | nil (36955.0) -
Content-ID の値を文字列で返します。
Content-ID の値を文字列で返します。
@see 2045 -
WEBrick
:: HTTPRequest # content _ type -> String | nil (36955.0) -
リクエストの Content-Type ヘッダを文字列で返します。
リクエストの Content-Type ヘッダを文字列で返します。 -
Net
:: IMAP :: ContentDisposition # param -> { String => String } | nil (27655.0) -
Content-Disposition フィールドのパラメータをハッシュテーブルで 返します。
Content-Disposition フィールドのパラメータをハッシュテーブルで
返します。
ハッシュテーブルのキーは以下のような値を取ります。詳しくは
2183 などを見てください。
* "FILENAME"
* "CREATION-DATE"
* "MODIFICATION-DATE"
* "READ-DAT"
* "SIZE" -
Net
:: IMAP :: ContentDisposition # dsp _ type -> String (27352.0) -
Content-Disposition フィールドのタイプを文字列で返します。
Content-Disposition フィールドのタイプを文字列で返します。
"INLINE", "ATTACHMENT" などの文字列を返します。
詳しくは 2183 などを見てください。 -
Net
:: IMAP :: BodyTypeBasic # description -> String | nil (18652.0) -
Content-Description の値を文字列で返します。
Content-Description の値を文字列で返します。
@see 2045 -
Net
:: IMAP :: BodyTypeMessage # description -> String | nil (18652.0) -
Content-Description の値を文字列で返します。
Content-Description の値を文字列で返します。
@see 2045 -
Net
:: IMAP :: BodyTypeText # description -> String | nil (18652.0) -
Content-Description の値を文字列で返します。
Content-Description の値を文字列で返します。
@see 2045 -
Encoding
:: Converter . new(source _ encoding , destination _ encoding , options) -> Encoding :: Converter (9937.0) -
Encoding::Converter オブジェクトを作成します。
Encoding::Converter オブジェクトを作成します。
@param source_encoding 変換元のエンコーディング
@param destination_encoding 変換先のエンコーディング
@param options 変換の詳細を指定する定数やハッシュ
@param convpath 変換経路の配列
options では String#encode でのハッシュオプションに加えて、以下の定数が利用可能です。
* Encoding::Converter::INVALID_REPLACE
* Encoding::Converter::UNDEF_RE... -
Encoding
:: Converter . new(convpath) -> Encoding :: Converter (9637.0) -
Encoding::Converter オブジェクトを作成します。
Encoding::Converter オブジェクトを作成します。
@param source_encoding 変換元のエンコーディング
@param destination_encoding 変換先のエンコーディング
@param options 変換の詳細を指定する定数やハッシュ
@param convpath 変換経路の配列
options では String#encode でのハッシュオプションに加えて、以下の定数が利用可能です。
* Encoding::Converter::INVALID_REPLACE
* Encoding::Converter::UNDEF_RE... -
Encoding
:: Converter . new(source _ encoding , destination _ encoding) -> Encoding :: Converter (9637.0) -
Encoding::Converter オブジェクトを作成します。
Encoding::Converter オブジェクトを作成します。
@param source_encoding 変換元のエンコーディング
@param destination_encoding 変換先のエンコーディング
@param options 変換の詳細を指定する定数やハッシュ
@param convpath 変換経路の配列
options では String#encode でのハッシュオプションに加えて、以下の定数が利用可能です。
* Encoding::Converter::INVALID_REPLACE
* Encoding::Converter::UNDEF_RE... -
REXML
:: Instruction # target -> String (9322.0) -
XML 処理命令のターゲットを返します。
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 # => "t... -
WEBrick
:: HTTPResponse # to _ s -> String (9322.0) -
実際にクライアントに送られるデータを文字列として返します。
実際にクライアントに送られるデータを文字列として返します。
require 'webrick'
include WEBrick
res = HTTPResponse.new( { :HTTPVersion => "1.1" } )
res.body = 'hoge'
print res.to_s
#=> 出力結果
HTTP/1.1 200 OK
Connection: Keep-Alive
Date: Sat, 27 Oct 2007 08:58:49 GMT
Server:
Content-Length: 4
hoge -
ruby 1
. 6 feature (991.0) -
ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。
ruby 1.6 feature
ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン
になります。
((<stable-snapshot|URL:ftp://ftp.netlab.co.jp/pub/lang/ruby/stable-snapshot.tar.gz>)) は、日々更新される安定版の最新ソースです。
== 1.6.8 (2002-12-24) -> stable-snapshot
: 2003-01-22: errno
EAGAIN と EWOULDBLOCK が同じ値のシステムで、EWOULDBLOCK がなくなっ
ていま... -
CGI
# header(options = "text / html") -> String (766.0) -
HTTP ヘッダを options に従って生成します。 CGI#out と違い、標準出力には出力しません。 CGI#out を使わずに自力で HTML を出力したい場合などに使います。 このメソッドは文字列エンコーディングを変換しません。
HTTP ヘッダを options に従って生成します。 CGI#out と違い、標準出力には出力しません。
CGI#out を使わずに自力で HTML を出力したい場合などに使います。
このメソッドは文字列エンコーディングを変換しません。
ヘッダのキーとしては以下が利用可能です。
: type
Content-Type ヘッダです。デフォルトは "text/html" です。
: charset
ボディのキャラクタセットを Content-Type ヘッダに追加します。
: nph
真偽値を指定します。真ならば、HTTP のバージョン、ステータスコード、
Date ヘッ... -
OpenURI
. open _ uri(name , mode = & # 39;r& # 39; , perm = nil , options = {}) -> StringIO (691.0) -
URI である文字列 name のリソースを取得して StringIO オブジェクト として返します。
URI である文字列 name のリソースを取得して StringIO オブジェクト
として返します。
ブロックを与えた場合は StringIO オブジェクトを引数としてブロックを
評価します。ブロックの終了時に StringIO は close されます。nil を返します。
require 'open-uri'
sio = OpenURI.open_uri('http://www.example.com')
p sio.last_modified
puts sio.read
OpenURI.open_uri('http://www.example.com'){|... -
ruby 1
. 8 . 4 feature (667.0) -
ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。
ruby 1.8.4 feature
ruby 1.8.4 での ruby 1.8.3 からの変更点です。
掲載方針
*バグ修正の影響も含めて動作が変わるものを収録する。
*単にバグを直しただけのものは収録しない。
*ライブラリへの単なる定数の追加は収録しない。
以下は各変更点に付けるべきタグです。
記号について(特に重要なものは大文字(主観))
# * カテゴリ
# * [ruby]: ruby インタプリタの変更
# * [api]: 拡張ライブラリ API
# * [lib]: ライブラリ
* レベル
* [bug]: バグ修正
* [new]: 追加され... -
OpenURI
:: OpenRead # read(options = {}) -> String (622.0) -
自身が表す内容を読み込んで文字列として返します。 self.open(options={}) {|io| io.read } と同じです。 このメソッドによって返される文字列は OpenURI::Meta によって extend されています。
自身が表す内容を読み込んで文字列として返します。
self.open(options={}) {|io| io.read } と同じです。
このメソッドによって返される文字列は OpenURI::Meta
によって extend されています。
@param options ハッシュを与えます。
require 'open-uri'
uri = URI.parse('http://www.example.com/')
str = uri.read
p str.is_a?(OpenURI::Meta) # => true
p str.content_type -
Kernel
. # open(name , mode = & # 39;r& # 39; , perm = nil , options = {}) -> StringIO | Tempfile | IO (619.0) -
name が http:// や ftp:// で始まっている文字列なら URI のリソースを 取得した上で StringIO オブジェクトまたは Tempfile オブジェクトとして返します。 返されるオブジェクトは OpenURI::Meta モジュールで extend されています。
name が http:// や ftp:// で始まっている文字列なら URI のリソースを
取得した上で StringIO オブジェクトまたは Tempfile オブジェクトとして返します。
返されるオブジェクトは OpenURI::Meta モジュールで extend されています。
name に open メソッドが定義されている場合は、*rest を引数として渡し
name.open(*rest, &block) のように name の open メソッドが呼ばれます。
これ以外の場合は、name はファイル名として扱われ、従来の
Kernel.#open(name, *res... -
CGI
# out(options = "text / html") { . . . . } (481.0) -
HTTP ヘッダと、ブロックで与えられた文字列を標準出力に出力します。
HTTP ヘッダと、ブロックで与えられた文字列を標準出力に出力します。
HEADリクエスト (REQUEST_METHOD == "HEAD") の場合は HTTP ヘッダのみを出力します。
charset が "iso-2022-jp"・"euc-jp"・"shift_jis" のいずれかで
ある場合は文字列エンコーディングを自動変換し、language を "ja"にします。
@param options Hash か文字列で HTTP ヘッダを生成するための情報を指定します。
例:
cgi = CGI.new
cgi.out{ "string" ... -
正規表現 (427.0)
-
正規表現 * metachar * expansion * char * anychar * string * str * quantifier * capture * grouping * subexp * selector * anchor * cond * option * encoding * comment * free_format_mode * absenceop * list * specialvar * references
正規表現
* metachar
* expansion
* char
* anychar
* string
* str
* quantifier
* capture
* grouping
* subexp
* selector
* anchor
* cond
* option
* encoding
* comment
* free_format_mode
* absenceop
* list
* specialvar
* references
正規表現(regular expression)は文字列のパタ... -
CSV
. filter(input , options = Hash . new) {|row| . . . } (373.0) -
このメソッドは CSV データに対して Unix のツール群のようなフィルタを構築 するのに便利です。
このメソッドは CSV データに対して Unix のツール群のようなフィルタを構築
するのに便利です。
与えられたブロックに一行ずつ渡されます。ブロックに渡された行は必要であ
れば変更することができます。ブロックの評価後に行を全て output に書き込
みます。
@param input String か IO のインスタンスを指定します。
デフォルトは ARGF です。
@param output String か IO のインスタンスを指定します。
デフォルトは $stdout です。
@param options ":in... -
CSV
. filter(input , output , options = Hash . new) {|row| . . . } (373.0) -
このメソッドは CSV データに対して Unix のツール群のようなフィルタを構築 するのに便利です。
このメソッドは CSV データに対して Unix のツール群のようなフィルタを構築
するのに便利です。
与えられたブロックに一行ずつ渡されます。ブロックに渡された行は必要であ
れば変更することができます。ブロックの評価後に行を全て output に書き込
みます。
@param input String か IO のインスタンスを指定します。
デフォルトは ARGF です。
@param output String か IO のインスタンスを指定します。
デフォルトは $stdout です。
@param options ":in... -
CSV
. filter(options = Hash . new) {|row| . . . } (373.0) -
このメソッドは CSV データに対して Unix のツール群のようなフィルタを構築 するのに便利です。
このメソッドは CSV データに対して Unix のツール群のようなフィルタを構築
するのに便利です。
与えられたブロックに一行ずつ渡されます。ブロックに渡された行は必要であ
れば変更することができます。ブロックの評価後に行を全て output に書き込
みます。
@param input String か IO のインスタンスを指定します。
デフォルトは ARGF です。
@param output String か IO のインスタンスを指定します。
デフォルトは $stdout です。
@param options ":in... -
ruby 1
. 8 . 2 feature (361.0) -
ruby 1.8.2 feature ruby 1.8.2 での ruby 1.8.1 からの変更点です。
ruby 1.8.2 feature
ruby 1.8.2 での ruby 1.8.1 からの変更点です。
掲載方針
*バグ修正の影響も含めて動作が変わるものを収録する。
*単にバグを直しただけのものは収録しない。
*ライブラリへの単なる定数の追加は収録しない。
以下は各変更点に付けるべきタグです。
*カテゴリ
* [ruby]: ruby インタプリタの変更
* [api]: 拡張ライブラリ API
* [lib]: ライブラリ
*レベル
* [bug]: バグ修正
* [new]: 追加されたクラス/メソッドなど
* [compat]: 変更されたクラス/... -
cgi (235.0)
-
CGI プログラムの支援ライブラリです。
CGI プログラムの支援ライブラリです。
CGI プロトコルの詳細については以下の文書を参照してください。
* https://tools.ietf.org/html/draft-coar-cgi-v11-03
* 3875: The Common Gateway Interface (CGI) Version 1.1
* https://www.w3.org/CGI/
=== 使用例
==== フォームフィールドの値を得る
//emlist[][ruby]{
require "cgi"
cgi = CGI.new
values = cgi['field_name'] ... -
ruby 1
. 8 . 3 feature (217.0) -
ruby 1.8.3 feature *((<ruby 1.8 feature>)) *((<ruby 1.8.2 feature>))
ruby 1.8.3 feature
*((<ruby 1.8 feature>))
*((<ruby 1.8.2 feature>))
ruby 1.8.2 から ruby 1.8.3 までの変更点です。
掲載方針
*バグ修正の影響も含めて動作が変わるものを収録する。
*単にバグを直しただけのものは収録しない。
*ライブラリへの単なる定数の追加は収録しない。
以下は各変更点に付けるべきタグです。
記号について(特に重要なものは大文字(主観))
* カテゴリ
* [ruby]: ruby インタプリタの変更
* [api]: 拡張ライブラリ API
* [lib]: ...