るりまサーチ

最速Rubyリファレンスマニュアル検索!
44件ヒット [1-44件を表示] (0.023秒)
トップページ > クエリ:Hash[x] > クエリ:set[x] > クエリ:read[x] > 種類:特異メソッド[x]

別のキーワード

  1. _builtin hash
  2. hash []
  3. dbm to_hash
  4. matrix hash
  5. _builtin to_hash

ライブラリ

クラス

モジュール

キーワード

検索結果

CSV.new(data, options = Hash.new) -> CSV (132.0)

このメソッドは CSV ファイルを読み込んだり、書き出したりするために String か IO のインスタンスをラップします。

...es a little time. Set manually if speed is important. Also
note that IO objects should be opened in binary mode on Windows if this
feature will be used as the line-ending translation can cause
problems with resetting the document position to where it was before the
read
ahead. This Str...
...a maximum size CSV will read ahead looking for the closing quote
for a field. (In truth, it reads to the first line ending beyond this
size.) If a quote cannot be found within the limit CSV will raise a
MalformedCSVError, assuming the data is faulty. You can use this limit to
prevent...
...what are effectively DoS attacks on the parser. However, this
limit can cause a legitimate parse to fail and thus is set to +nil+, or off,
by default.
: :converters
CSV::Converters から取り出した名前の配列です。変換器が一つだけ
の場合は配列に格納する必...

OpenURI.open_uri(name, mode = 'r', perm = nil, options = {}) -> StringIO (37.0)

URI である文字列 name のリソースを取得して StringIO オブジェクト として返します。

...io.read

OpenURI.open_uri('http://www.example.com'){|sio| sio.read }

options には Hash を与えます。理解するハッシュの
キーは以下のシンボル、
* :proxy
* :progress_proc
* :content_length_proc
* :http_basic_authentication
* :proxy_http_basic_authentication
* :read_t...
..."proxy-password"]
:proxy_http_basic_authentication =>
[URI.parse("http://proxy.example.com:8000/"), "proxy-user", "proxy-password"]
//}

: :read_timeout
http コネクションのタイムアウト秒数を指定します。nil でタイムアウトなしを
指定できます。

: :ssl_c...
...09::Store#add_file、
OpenSSL::X509::Store#add_path
を参照してください。デフォルトの証明書については
OpenSSL::X509::Store#set_default_paths
を参照してください。

: :ssl_verify_mode
SSL の証明書の検証のモードを指定します。
詳しくは OpenSSL...

OpenURI.open_uri(name, mode = 'r', perm = nil, options = {}) {|sio| ... } -> nil (37.0)

URI である文字列 name のリソースを取得して StringIO オブジェクト として返します。

...io.read

OpenURI.open_uri('http://www.example.com'){|sio| sio.read }

options には Hash を与えます。理解するハッシュの
キーは以下のシンボル、
* :proxy
* :progress_proc
* :content_length_proc
* :http_basic_authentication
* :proxy_http_basic_authentication
* :read_t...
..."proxy-password"]
:proxy_http_basic_authentication =>
[URI.parse("http://proxy.example.com:8000/"), "proxy-user", "proxy-password"]
//}

: :read_timeout
http コネクションのタイムアウト秒数を指定します。nil でタイムアウトなしを
指定できます。

: :ssl_c...
...09::Store#add_file、
OpenSSL::X509::Store#add_path
を参照してください。デフォルトの証明書については
OpenSSL::X509::Store#set_default_paths
を参照してください。

: :ssl_verify_mode
SSL の証明書の検証のモードを指定します。
詳しくは OpenSSL...

JSON::Parser.new(source, options => {}) -> JSON::Parser (25.0)

パーサを初期化します。

...せん。デフォルトは真です。
: :object_class
JSON のオブジェクトを変換するクラスを指定します。デフォルトは Hash です。
: :array_class
JSON の配列を変換するクラスを指定します。デフォルトは Array です。

@param source パーサ...
...@param options オプションを指定するためのハッシュです。

//emlist[例][ruby]{
require 'json'

parser = JSON::Parser.new(DATA.read)
print parser.source

# => {
# => "Tanaka": {
# => "name":"tanaka",
# => "age":20
# => },
# => "Suzuki": {
# => "name":"suzuki",
#...
...る][ruby]{
require 'json'

class Person
attr_accessor :name, :age

def []=(key, value)
instance_variable_set("@#{key}", value)
end
end

parser = JSON::Parser.new(DATA.read, object_class: Person)
person = parser.parse
person.class # => Person
person.name # => "tanaka"
person.age # => 20...