38件ヒット
[1-38件を表示]
(0.120秒)
別のキーワード
クラス
モジュール
-
Net
:: HTTPHeader (24)
検索結果
先頭4件
-
RubyVM
:: AbstractSyntaxTree :: Node # type -> Symbol (50226.0) -
self の種類を Symbol で返します。
...self の種類を Symbol で返します。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 1')
p node.type # => :SCOPE
//}... -
RubyVM
:: AbstractSyntaxTree :: Node # children -> Array (35125.0) -
self の子ノードを配列で返します。
...のノードの type によって異なります。
戻り値は、ほかの RubyVM::AbstractSyntaxTree::Node のインスタンスや nil を含みます。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 2')
p node.children
# => [[], nil, #<RubyVM::AbstractSyntaxTree::Node:OPCALL@... -
Net
:: HTTPHeader # sub _ type -> String|nil (15332.0) -
"text/html" における "html" のようなサブタイプを表す 文字列を返します。
...タイプを表す
文字列を返します。
Content-Type: ヘッダフィールドが存在しない場合には nil を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
res = Net::HTTP.get_response(uri)
res.sub_type # => "html"
//}... -
Net
:: HTTPHeader # key?(key) -> bool (3125.0) -
key というヘッダフィールドがあれば真を返します。 key は大文字小文字を区別しません。
...ません。
@param key 探すヘッダフィールド名を文字列で与えます。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
res = Net::HTTP.get_response(uri)
res.key?('content-type') # => true
res.key?('nonexist-header') # => false
//}...