るりまサーチ

最速Rubyリファレンスマニュアル検索!
341件ヒット [201-300件を表示] (0.036秒)
トップページ > クエリ:set[x] > クエリ:parse[x]

別のキーワード

  1. tracer set_get_line_procs
  2. _builtin set_encoding
  3. stringio set_encoding
  4. set new
  5. openssl set

検索結果

<< < 1 2 3 4 > >>

CSV (30.0)

このクラスは CSV ファイルやデータに対する完全なインターフェイスを提供します。

...sample.csv")
# => [["Ruby", "1995"], ["Rust", "2010"]]

# 文字列から一行ずつ
CSV.parse(csv_text) do |row|
p row
end
# => ["Ruby", "1995"]
# ["Rust", "2010"]

# 文字列から一度に
p CSV.parse(csv_text)
# => [["Ruby", "1995"], ["Rust", "2010"]]
//}

=== 書き込み

//emlist[][rub...
...# ...
end
//}

=== 一行変換

//emlist[][ruby]{
require 'csv'

csv_string = ["CSV", "data"].to_csv # => "CSV,data"
csv_array = "CSV,String".parse_csv # => ["CSV", "String"]
//}

=== ショートカット

//emlist[][ruby]{
require 'csv'

CSV { |csv_out| csv_out << %w{my data he...
..., since CSV's defaults should just
magically work for you data. However, you can set these values manually in
the target Encoding to avoid the translation.

It's also important to note that while all of CSV's core parser is now
Encoding agnostic, some features are not. For example, the built-in
co...

Kernel.#caller(range) -> [String] | nil (30.0)

start 段上の呼び出し元の情報を $@ の形式のバックトレース(文字列の配列)として返します。

...個数を指定します。

@param range 取得したいスタックの範囲を示す Range オブジェクトを指定します。

@see Kernel.#set_trace_func,Kernel.#raise,
Kernel.#caller_locations

//emlist[例][ruby]{
def foo
p caller(0)
p caller(1)
p caller(2)
p caller(3)
p ca...
...//emlist[例][ruby]{
def parse_caller(at)
if /^(.+?):(\d+)(?::in `(.*)')?/ =~ at
file = $1
line = $2.to_i
method = $3
[file, line, method]
end
end

def foo
p parse_caller(caller.first)
end

def bar
foo
p parse_caller(caller.first)
end

bar
p parse_caller(caller.first)

#=...

Kernel.#caller(start = 1) -> [String] | nil (30.0)

start 段上の呼び出し元の情報を $@ の形式のバックトレース(文字列の配列)として返します。

...個数を指定します。

@param range 取得したいスタックの範囲を示す Range オブジェクトを指定します。

@see Kernel.#set_trace_func,Kernel.#raise,
Kernel.#caller_locations

//emlist[例][ruby]{
def foo
p caller(0)
p caller(1)
p caller(2)
p caller(3)
p ca...
...//emlist[例][ruby]{
def parse_caller(at)
if /^(.+?):(\d+)(?::in `(.*)')?/ =~ at
file = $1
line = $2.to_i
method = $3
[file, line, method]
end
end

def foo
p parse_caller(caller.first)
end

def bar
foo
p parse_caller(caller.first)
end

bar
p parse_caller(caller.first)

#=...

Kernel.#caller(start, length) -> [String] | nil (30.0)

start 段上の呼び出し元の情報を $@ の形式のバックトレース(文字列の配列)として返します。

...個数を指定します。

@param range 取得したいスタックの範囲を示す Range オブジェクトを指定します。

@see Kernel.#set_trace_func,Kernel.#raise,
Kernel.#caller_locations

//emlist[例][ruby]{
def foo
p caller(0)
p caller(1)
p caller(2)
p caller(3)
p ca...
...//emlist[例][ruby]{
def parse_caller(at)
if /^(.+?):(\d+)(?::in `(.*)')?/ =~ at
file = $1
line = $2.to_i
method = $3
[file, line, method]
end
end

def foo
p parse_caller(caller.first)
end

def bar
foo
p parse_caller(caller.first)
end

bar
p parse_caller(caller.first)

#=...

NEWS for Ruby 2.4.0 (30.0)

NEWS for Ruby 2.4.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...nSSL は https://github.com/ruby/openssl に分離されましたが、デフォルトGemとして残っています。

* optparse
* OptionParser#parseやOptionParser#orderにキーワード引数 into を追加 11191

* pathname
* Pathname#empty? を追加 12596

* readline
* Rea...
...l is specified, attribute
value is returned. Otherwise, Nth child is returned. This is
backward compatible change.

* set
* Set#compare_by_identity, Set#compare_by_identity? を追加
12210

* webrick
* "," をクッキーの区切り文字として許可しなくなり...
...ip, Zlib.gunzip を追加 13020

=== C API の更新

* ruby_show_version() will no longer exits the process, if
RUBY_SHOW_COPYRIGHT_TO_DIE is set to 0. This will be the default in
the future.

* rb_gc_adjust_memory_usage() [Feature #12690]

=== サポートするプラットフォー...

絞り込み条件を変える

NEWS for Ruby 2.7.0 (30.0)

NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...ame": "Alice",
"age": 30,
"children": [{ "name": "Bob", "age": 2 }]
}
END

JSON.parse(json, symbolize_names: true) in {name: "Alice", children: [{name: name, age: age}]}

p name #=> "Bob"
p age #=> 2

JSON.parse(json, symbolize_names: true) in {name: "Alice", children: [{name: "Charlie", age: a...
...が単一の代入と同じ振る舞いになりました。 8279

//emlist[][ruby]{
a, b = raise rescue [1, 2]
# Previously parsed as: (a, b = raise) rescue [1, 2]
# Now parsed as: a, b = (raise rescue [1, 2])
//}

* 特異クラス構文での yield は警告を表示するようにな...
...照してください。

* IO
* 新規メソッド
* BOMをチェックして外部エンコーディングを設定する
IO#set_encoding_by_bomメソッドが追加されました。 15210

* Integer
* 変更されたメソッド
* Integer#[] がRangeを受け付...

WEBrick::HTTPResponse#cookies -> [WEBrick::Cookie] (28.0)

レスポンスの Set-Cookie ヘッダの値を表す WEBrick::Cookie オブジェクトの配列です。 レスポンスに新たに Cookie を加えたい場合はこの配列に WEBrick::Cookie オブジェクトを加えます。

...ンスの Set-Cookie ヘッダの値を表す WEBrick::Cookie オブジェクトの配列です。
レスポンスに新たに Cookie を加えたい場合はこの配列に WEBrick::Cookie オブジェクトを加えます。

require 'webrick'
res.cookies << WEBrick::Cookie.parse_set_cookie(k)...

Net::HTTPHeader#form_data=(params) (25.0)

HTMLのフォームのデータ params から ヘッダフィールドとボディを設定します。

...et/http'

uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.form_data = {"q" => ["ruby", "perl"], "lang" => "en"} # => {"q"=>["ruby", "perl"], "lang"=>"en"}
//}

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

uri = URI.parse('http://www.exampl...
...e.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.set_form_data({"q" => "ruby", "lang" => "en"}, ';') # => "application/x-www-form-urlencoded"
//}...

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

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

...d. Obviously,
discovery takes 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 bef...
...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 から取...
...一行目をヘッダとして扱います。
配列を指定するとそれをヘッダとして扱います。文字列を指定すると CSV.parse_line を
使用してパースした結果をヘッダとして扱います。このとき、:col_sep, :row_sep, :quote_char
はこのインス...

OpenURI.open_uri(name, mode = &#39;r&#39;, perm = nil, options = {}) -> StringIO (18.0)

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

...えます。
//emlist{
文字列: "http://proxy.example.com:8000/" のようなプロクシの URI。
URI オブジェクト: URI.parse("http://proxy.example.com:8000/") のようなプロクシの URI オブジェクト。
true: Proxy を環境変数などから見つ...
...tp_basic_authentication =>
["http://proxy.example.com:8000/", "proxy-user", "proxy-password"]
:proxy_http_basic_authentication =>
[URI.parse("http://proxy.example.com:8000/"), "proxy-user", "proxy-password"]
//}

: :read_timeout
http コネクションのタイムアウト秒数を指...
...09::Store#add_file、
OpenSSL::X509::Store#add_path
を参照してください。デフォルトの証明書については
OpenSSL::X509::Store#set_default_paths
を参照してください。

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

絞り込み条件を変える

<< < 1 2 3 4 > >>