92件ヒット
[1-92件を表示]
(0.055秒)
クラス
- CSV (22)
-
OpenSSL
:: BN (11)
モジュール
- JSON (44)
キーワード
-
NEWS for Ruby 3
. 0 . 0 (4) -
generate
_ line (11) -
generate
_ prime (11) - new (11)
-
pretty
_ generate (11) -
pretty
_ unparse (11) -
ruby 1
. 8 . 2 feature (11) - unparse (11)
検索結果
先頭5件
-
JSON
. # generate(object , state = nil) -> String (24433.0) -
与えられたオブジェクトを一行の JSON 形式の文字列に変換して返します。
...は将来削除される予定です。
@param object JSON 形式の文字列に変換するオブジェクトを指定します。
@param state JSON::State または、to_hash や to_h メソッドでハッシュに変換可能なオブジェクトを指定できます。
ハッシュを......。
: :space
a string that is put after, a : or , delimiter (default: '')
: :space_before
a string that is put before a : pair delimiter (default: '')
: :object_nl
a string that is put at the end of a JSON object (default: '')
: :array_nl
a string that is put at the end of a JSON array (defa......GeneratorError JSON::NaN, JSON::Infinity,JSON::MinusInfinity
を生成しようとした場合に発生します。
@raise JSON::CircularDatastructure 与えられたオブジェクトが循環参照を持つ場合に発生します。
//emlist[例][ruby]{
require "json"
JSON.generate([1,... -
OpenSSL
:: BN . generate _ prime(bits , safe=true , add=nil , rem=nil) -> OpenSSL :: BN (12409.0) -
ランダム(擬似乱数的)な bits ビットの素数を返します。
...が素数である素数p)を
返します。
add に整数を渡すと、 p % add == rem であるような
素数pのみを返します。rem が nil の場合は rem=1と見なします。
@param bits 生成するランダム素数のビット数
@param safe true で安全な素数のみを生... -
JSON
. # pretty _ generate(object , options = nil) -> String (12339.0) -
Ruby のオブジェクトを JSON 形式の文字列に変換して返します。
...このメソッドは JSON.#generate よりも人間に読みやすい文字列を返します。
pretty_unparse は将来削除される予定です。
@param object JSON 形式の文字列に変換するオブジェクトを指定します。
@param options JSON::State または、to_hash や t......JSON.#generate を参照してください。
//emlist[例][ruby]{
require "json"
hash = { "name": "tanaka", "age": 19 }
puts JSON.generate(hash)
# => {"name":"tanaka","age":19}
puts JSON.pretty_generate(hash)
# => {
# "name": "tanaka",
# "age": 19
# }
puts JSON.pretty_generate(hash......, space: "\t")
# => {
# "name": "tanaka",
# "age": 19
# }
//}
@see JSON.#generate... -
CSV
. generate _ line(row , options = Hash . new) -> String (12213.0) -
このメソッドは一つの Array オブジェクトを CSV 文字列に変換するためのショートカットです。 複数行のCSVを扱う際はCSV#<<を使うとより高速です。
...す。
複数行のCSVを扱う際はCSV#<<を使うとより高速です。
このメソッドは可能であれば row に含まれる最初の nil でない値を用いて出力の
エンコーディングを推測します。
@param row 文字列の配列を指定します。
@param options C......コーディングを指定することができます。
:row_sep というキーの値には $/ がセットされます。
//emlist[例][ruby]{
require "csv"
taro = ['1', 'taro', 'tanaka', '20']
CSV.generate_line(taro, col_sep: '|') # => "1|taro|tanaka|20\n"
//}
@see CSV.new... -
JSON
. # unparse(object , state = nil) -> String (6233.0) -
与えられたオブジェクトを一行の JSON 形式の文字列に変換して返します。
...は将来削除される予定です。
@param object JSON 形式の文字列に変換するオブジェクトを指定します。
@param state JSON::State または、to_hash や to_h メソッドでハッシュに変換可能なオブジェクトを指定できます。
ハッシュを......。
: :space
a string that is put after, a : or , delimiter (default: '')
: :space_before
a string that is put before a : pair delimiter (default: '')
: :object_nl
a string that is put at the end of a JSON object (default: '')
: :array_nl
a string that is put at the end of a JSON array (defa......GeneratorError JSON::NaN, JSON::Infinity,JSON::MinusInfinity
を生成しようとした場合に発生します。
@raise JSON::CircularDatastructure 与えられたオブジェクトが循環参照を持つ場合に発生します。
//emlist[例][ruby]{
require "json"
JSON.generate([1,... -
JSON
. # pretty _ unparse(object , options = nil) -> String (6139.0) -
Ruby のオブジェクトを JSON 形式の文字列に変換して返します。
...このメソッドは JSON.#generate よりも人間に読みやすい文字列を返します。
pretty_unparse は将来削除される予定です。
@param object JSON 形式の文字列に変換するオブジェクトを指定します。
@param options JSON::State または、to_hash や t......JSON.#generate を参照してください。
//emlist[例][ruby]{
require "json"
hash = { "name": "tanaka", "age": 19 }
puts JSON.generate(hash)
# => {"name":"tanaka","age":19}
puts JSON.pretty_generate(hash)
# => {
# "name": "tanaka",
# "age": 19
# }
puts JSON.pretty_generate(hash......, space: "\t")
# => {
# "name": "tanaka",
# "age": 19
# }
//}
@see JSON.#generate... -
ruby 1
. 8 . 2 feature (3096.0) -
ruby 1.8.2 feature ruby 1.8.2 での ruby 1.8.1 からの変更点です。
...ruby 1.8.2 feature
ruby 1.8.2 での ruby 1.8.1 からの変更点です。
掲載方針
*バグ修正の影響も含めて動作が変わるものを収録する。
*単にバグを直しただけのものは収録しない。
*ライブラリへの単なる定数の追加は収録しない。......toRunner.options [lib] [compat]
add new option --exclude (-x). ((<ruby-dev:24865>))
: CGI::Session.initialize [lib] [compat]
'sufix' オプションを設定できるようになりました。
=== 2004-11-10
: Array#pack [ruby] [change]
P 指定子以外では nil を 0 に変換しなく......'2'], ['3', 'r']]
: CSV::Row [lib] [obsolete]
: CSV::Cell [lib] [obsolete]
CSV::Row と CSV::Cell が deprecated になりました。
: CSV.open, CSV.parse, and CSV,generate
必要ならばユーザが binmode をセットしなければならなくなりました。
: CSV.read [... -
CSV
. new(data , options = Hash . new) -> CSV (112.0) -
このメソッドは CSV ファイルを読み込んだり、書き出したりするために String か IO のインスタンスをラップします。
...とになります。
文字列に追記したい場合は CSV.generate を使用してください。
他の位置から処理したい場合はあらかじめそのように設定した StringIO を渡してください。
@param data String か IO のインスタンスを指定します。......s in a quoted field, assuming that you
would have the same line endings there. If none of those sequences is
found, +data+ is ARGF, Object::STDIN, Object::STDOUT, or
Object::STDERR, or the stream is only available for output, the default
$INPUT_RECORD_SEPARATOR ($/) is used. Obviously,......imit 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... -
NEWS for Ruby 3
. 0 . 0 (42.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...s are now separated from positional arguments.
Code that resulted in deprecation warnings in Ruby 2.7 will now
result in ArgumentError or different behavior. 14183
* Procs accepting a single rest argument and keywords are no longer
subject to autosplatting. This now matches the behavi......ll be shown now. 14413
* `TRUE`/`FALSE`/`NIL` constants are no longer defined.
* Integer#zero? overrides Numeric#zero? for optimization. 16961
* Enumerable#grep and Enumerable#grep_v when passed a Regexp and no block no longer modify Regexp.last_match. 17030
* Requiring 'open-uri' no longe......or 10th or later members
* Constant references are inlined.
* Always generate appropriate code for `==`, `nil?`, and `!` calls depending on a receiver class.
* Reduce the number of PC accesses on branches and method returns.
* Optimize C method calls a little.
* Compilation process...