別のキーワード
クラス
- Array (11)
- CSV (55)
-
JSON
:: State (143)
キーワード
- CSV (11)
- JSON (11)
-
NEWS for Ruby 3
. 0 . 0 (4) - [] (11)
-
check
_ circular? (11) - configure (11)
-
create
_ id (11) - csv (11)
- dump (11)
-
fast
_ generate (11) -
fast
_ unparse (11) -
force
_ quotes? (11) -
generate
_ line (11) - indent (11)
- indent= (11)
-
max
_ nesting (11) -
max
_ nesting= (11) - merge (11)
- new (11)
-
object
_ nl (11) -
object
_ nl= (11) -
pretty
_ generate (11) -
pretty
_ unparse (11) -
ruby 1
. 8 . 2 feature (11) -
rubygems
/ commands / generate _ index _ command (11) -
rubygems
/ commands / lock _ command (11) - space (11)
- space= (11)
-
space
_ before (11) -
space
_ before= (11) -
to
_ csv (11) - unparse (11)
-
write
_ headers? (11)
検索結果
先頭5件
-
rubygems
/ commands / generate _ index _ command (32030.0) -
ある Gem サーバに対するインデックスを作成するためのライブラリです。
...ある Gem サーバに対するインデックスを作成するためのライブラリです。
Usage: gem generate_index [options]
Options:
-d, --directory=DIRNAME repository base dir containing gems subdir
Common Options:
-h, --help この......ックトレースを表示します
--debug Ruby 自体のデバッグオプションを有効にします
Summary:
Generates the index files for a gem server directory
Description:
The generate_index command creates a set of indexes for serving ge......ms
statically. The command expects a 'gems' directory under the path given to
the --directory option. When done, it will generate a set of files like
this:
gems/ # .gem files you want to
index
quick/index
qui... -
rubygems
/ commands / lock _ command (26012.0) -
指定された特定のバージョンの Gem パッケージに依存する Gem を使用するために 必要な Kernel#gem メソッドの呼び出し方法を文字列で出力します。
...た設定ファイルを使用します
--backtrace バックトレースを表示します
--debug Ruby 自体のデバッグオプションを有効にします
Arguments:
GEMNAME ロックする Gem パッケージの名前......特定バージョンの Gem パッケージを使用するために必要な記述を表示します
Description:
The lock command will generate a list of +gem+ statements that will lock
down
the versions for the gem given in the command line. It will specify exact
vers......be consistent. A full recursive search of all effected gems will be
generated.
Example:
gemlock rails-1.0.0 > lockdown.rb
will produce in lockdown.rb:
require "rubygems"
gem 'rails', '= 1.0.0'
gem 'rake', '= 0.7.0.1'... -
JSON
. # generate(object , state = nil) -> String (18125.0) -
与えられたオブジェクトを一行の JSON 形式の文字列に変換して返します。
...環参照を持つ場合に発生します。
//emlist[例][ruby]{
require "json"
JSON.generate([1, 2, { name: "tanaka", age: 19 }])
# => "[1,2,{\"name\":\"tanaka\",\"age\":19}]"
json_state = JSON::State.new(space: " ")
JSON.generate([1, 2, { name: "tanaka", age: 19 }], json_state)
# => "[1,2,{\"n......ame\": \"tanaka\",\"age\": 19}]"
//}
@see JSON::State, JSON.#pretty_generate... -
CSV
. generate(str = "" , options = Hash . new) {|csv| . . . } -> String (18113.0) -
このメソッドは与えられた文字列をラップして CSV のオブジェクトとしてブロックに渡します。 ブロック内で CSV オブジェクトに行を追加することができます。 ブロックを評価した結果は文字列を返します。
...トを
指定する必要があります。
//emlist[例][ruby]{
require "csv"
text =<<-EOS
id,first name,last name,age
1,taro,tanaka,20
2,jiro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
EOS
csv = CSV.generate(text, headers: true) do |csv|
csv.add_row(["5", "saburo", "kondo", "34"]... -
JSON
. # pretty _ generate(object , options = nil) -> String (6159.0) -
Ruby のオブジェクトを JSON 形式の文字列に変換して返します。
...
Ruby のオブジェクトを JSON 形式の文字列に変換して返します。
このメソッドは JSON.#generate よりも人間に読みやすい文字列を返します。
pretty_unparse は将来削除される予定です。
@param object JSON 形式の文字列に変換するオブ......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 (6113.0) -
このメソッドは一つの Array オブジェクトを CSV 文字列に変換するためのショートカットです。 複数行のCSVを扱う際はCSV#<<を使うとより高速です。
...コーディングを指定することができます。
: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
. # fast _ generate(object) -> String (6113.0) -
与えられたオブジェクトを一行の JSON 形式の文字列に変換して返します。
...けてください。
fast_unparse は将来削除される予定です。
@param object JSON 形式の文字列に変換するオブジェクトを指定します。
//emlist[例][ruby]{
require "json"
JSON.fast_generate({ name: "tanaka", age: 19 }) # => "{\"name\":\"tanaka\",\"age\":19}"
//}... -
ruby 1
. 8 . 2 feature (3629.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 からの変更点です。
掲載方針
*バグ修正の影響も含めて動作が変わるものを収録する。
*単にバグを直しただけのものは収録しない。
*ライブラリへの単なる定数の追加は収録しない。......以下は各変更点に付けるべきタグです。
*カテゴリ
* [ruby]: ruby インタプリタの変更
* [api]: 拡張ライブラリ API
* [lib]: ライブラリ
*レベル
* [bug]: バグ修正
* [new]: 追加されたクラス/メソッドなど
* [compat]: 変更された......なりました。
: CSV.open, CSV.parse, and CSV,generate
必要ならばユーザが binmode をセットしなければならなくなりました。
: CSV.read [lib] [new]
: CSV.readlines [lib] [new]
追加。
: Marshal.dump [ruby] [bug]
特異メソッドを定義されていな... -
NEWS for Ruby 3
. 0 . 0 (3195.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...NEWS for Ruby 3.0.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス......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 behavior of Procs
accepting a single rest argument and no keywords.
16166
//emlist[][ruby]{......rd`, `#to_i`, `#to_int`, `#zero?`
* `Struct`: reader methods for 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 re... -
JSON
. # pretty _ unparse(object , options = nil) -> String (3059.0) -
Ruby のオブジェクトを JSON 形式の文字列に変換して返します。
...
Ruby のオブジェクトを JSON 形式の文字列に変換して返します。
このメソッドは JSON.#generate よりも人間に読みやすい文字列を返します。
pretty_unparse は将来削除される予定です。
@param object JSON 形式の文字列に変換するオブ......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...