るりまサーチ

最速Rubyリファレンスマニュアル検索!
154件ヒット [1-100件を表示] (0.203秒)
トップページ > クエリ:i[x] > クエリ:l[x] > クエリ:NIL[x] > クエリ:new[x] > クエリ:content[x]

別のキーワード

  1. kernel $-l
  2. _builtin $-l
  3. matrix l
  4. lupdecomposition l
  5. $-l kernel

検索結果

<< 1 2 > >>

REXML::Instruction.new(target, content = nil) -> REXML::Instruction (24509.0)

新たな Instruction オブジェクトを生成します。

...新たな Instruction オブジェクトを生成します。

@param target ターゲット
@param content 内容...

REXML::Instruction#content -> String | nil (24432.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 # => "type=\"text/css\" href=\"style.css\""
doc[4].target # => "foobar"
doc[4].content # => nil
//}...

WEBrick::HTTPResponse#content_length -> Integer | nil (15537.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 から全てを読み込ん
でそれをエンティティボディとします。nil でないとき IO から content_length バイトだ...
...には
content
_length の値は無視され Content-Length ヘッダはレスポンスに含まれません。

@param len ヘッダの値を整数で指定します。nil を指定することは出来ません。

require 'webrick'
i
nclude WEBrick
res = HTTPResponse.new( { :HTTPVersion => "1...

WEBrick::HTTPResponse#content_length=(len) (15437.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 から全てを読み込ん
でそれをエンティティボディとします。nil でないとき IO から content_length バイトだ...
...には
content
_length の値は無視され Content-Length ヘッダはレスポンスに含まれません。

@param len ヘッダの値を整数で指定します。nil を指定することは出来ません。

require 'webrick'
i
nclude WEBrick
res = HTTPResponse.new( { :HTTPVersion => "1...

Net::HTTPHeader#content_length -> Integer|nil (12454.0)

Content-Length: ヘッダフィールドの表している値を整数で返します。

...Content-Length: ヘッダフィールドの表している値を整数で返します。

ヘッダが設定されていない場合には nil を返します。

@raise Net::HTTPHeaderSyntaxError フィールドの値が不正である場合に
発生します。...
...//emlist[例][ruby]{
require 'net/http'

uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.content_length # => nil
req.content_length = 10
req.content_length # => 10
//}...

絞り込み条件を変える

Net::HTTPHeader#content_type -> String|nil (6460.0)

"text/html" のような Content-Type を表す 文字列を返します。

...ml" のような 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/form-data'
req.content_type # => "multipart/form-data"
//}...

Net::HTTPHeader#content_range -> Range|nil (6454.0)

Content-Range: ヘッダフィールドの値を Range で返します。 Range の表わす長さは Net::HTTPHeader#range_length で得られます。

...
Content
-Range: ヘッダフィールドの値を Range で返します。
Range の表わす長さは Net::HTTPHeader#range_length で得られます。

ヘッダが設定されていない場合には nil を返します。

//emlist[例][ruby]{
require 'net/http'

uri = URI.parse('http://www.exa...
...mple.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.content_range # => nil
req['Content-Range'] = "bytes 0-499/1234"
req.content_range # => 0..499
//}...

Net::HTTPHeader#delete(key) -> [String] | nil (6343.0)

key ヘッダフィールドを削除します。

...
nil
を返します。

//emlist[例][ruby]{
require 'net/http'

uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.content_length = 10
req.content_length # => 10
req.delete("Content-Length") # => ["10"]
req.content_length # => nil
//}...

Net::HTTPHeader#range_length -> Integer|nil (6341.0)

Content-Range: ヘッダフィールドの表している長さを整数で返します。

...
Content
-Range: ヘッダフィールドの表している長さを整数で返します。

ヘッダが設定されていない場合には nil を返します。

@raise Net::HTTPHeaderSyntaxError Content-Range: ヘッダフィールド
の値が不正である...
...発生します。


//emlist[例][ruby]{
require 'net/http'

uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req['Content-Range'] = "bytes 1-500/1000"
req.range_length # => 500
//}...

WEBrick::HTTPUtils::FormData#[](header) -> String | nil (6329.0)

自身が multipart/form-data なデータの場合に、header で指定された ヘッダの値を文字列で返します。無ければ nil を返します。

...multipart/form-data なデータの場合に、header で指定された
ヘッダの値を文字列で返します。無ければ nil を返します。

@param header ヘッダ名を文字列で指定します。大文字と小文字を区別しません。

例:

require "webrick/cgi"
class M...
...yCGI < WEBrick::CGI
def do_GET(req, res)
p req.query['q']['content-type'] #=> "plain/text"
end
end
MyCGI.new.start()...

絞り込み条件を変える

<< 1 2 > >>