るりまサーチ

最速Rubyリファレンスマニュアル検索!
155件ヒット [1-100件を表示] (0.125秒)

別のキーワード

  1. time parse
  2. parser parse
  3. csv parse
  4. ripper parse
  5. psych parse_stream

ライブラリ

モジュール

キーワード

検索結果

<< 1 2 > >>

RubyVM::AbstractSyntaxTree::Node#type -> Symbol (18214.0)

self の種類を Symbol で返します。

...self の種類を Symbol で返します。

//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 1')
p node.type # => :SCOPE
//}...

REXML::Parsers::PullEvent#event_type -> Symbol (9208.0)

イベントの種類をシンボルで返します。

...イベントの種類をシンボルで返します。

詳しくは c:REXML::Parsers::PullParser#event_type を参照してください。...

REXML::Parsers::PullEvent#doctype? -> bool (9201.0)

DTD 開始なら真を返します。

DTD 開始なら真を返します。

Net::HTTPHeader#content_type=(type) (6301.0)

type と params から Content-Type: ヘッダフィールドの 値を設定します。

...type と params から Content-Type: ヘッダフィールドの
値を設定します。

@param type メディアタイプを文字列で指定します。
@param params パラメータ属性をハッシュで指定します。

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

uri = URI.parse('http://www....
...example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.content_type # => nil
req.content_type = 'multipart/form-data' # => "multipart/form-data"
req.content_type # => "multipart/form-data"
//}...

Net::HTTPHeader#set_content_type(type, params = {}) (6301.0)

type と params から Content-Type: ヘッダフィールドの 値を設定します。

...type と params から Content-Type: ヘッダフィールドの
値を設定します。

@param type メディアタイプを文字列で指定します。
@param params パラメータ属性をハッシュで指定します。

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

uri = URI.parse('http://www....
...example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.content_type # => nil
req.content_type = 'multipart/form-data' # => "multipart/form-data"
req.content_type # => "multipart/form-data"
//}...

絞り込み条件を変える

Net::HTTPHeader#type_params -> Hash (6296.0)

Content-Type のパラメータを {"charset" => "iso-2022-jp"} という形の Hash で返します。

...Content-Type のパラメータを {"charset" => "iso-2022-jp"}
という形の Hash で返します。

Content-Type: ヘッダフィールドが存在しない場合には
空のハッシュを返します。

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

uri = URI.parse('http://www.example.com/index.h...
...tml')
res = Net::HTTP.get_response(uri)
res.type_params # => {"charset"=>"UTF-8"}
//}...

Net::HTTPHeader#content_type -> String|nil (6282.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/form-data'
req.content_type # => "multipart/form-data"
//}...

Net::HTTPHeader#main_type -> String|nil (6226.0)

"text/html" における "text" のようなタイプを表す 文字列を返します。

...タイプを表す
文字列を返します。

Content-Type: ヘッダフィールドが存在しない場合には nil を返します。

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

uri = URI.parse('http://www.example.com/index.html')
res = Net::HTTP.get_response(uri)
res.main_type # => "text"
//}...

Net::HTTPHeader#sub_type -> String|nil (6226.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"
//}...

OptionParser#reject(klass) -> () (3137.0)

OptionParser#accept で登録したクラスとブロックを 自身から削除します。

...OptionParser#accept で登録したクラスとブロックを
自身から削除します。

@param klass 自身から削除したいクラスを指定します。

//emlist[例][ruby]{
require "optparse"
require "time"

def parse(option_parser)
option_parser.on("-t", "--time [TIME]", Time) do...
...ime.class
end
option_parser.parse(ARGV)
end

opts = OptionParser.new
opts.accept(Time) do |s,|
begin
Time.parse(s) if s
rescue
raise OptionParser::InvalidArgument, s
end
end

parse
(opts) # => Time
opts.reject(Time)
parse
(opts) # => unsupported argument type: Time (ArgumentError)
//...

絞り込み条件を変える

<< 1 2 > >>