921件ヒット
[1-100件を表示]
(0.037秒)
別のキーワード
ライブラリ
-
irb
/ context (12) - psych (402)
-
rubygems
/ commands / build _ command (12) -
rubygems
/ config _ file (12) -
yaml
/ dbm (300)
クラス
-
Gem
:: Commands :: BuildCommand (12) -
Gem
:: ConfigFile (12) -
IRB
:: Context (12) - Object (36)
-
Psych
:: Handler (12) -
Psych
:: Nodes :: Mapping (12) -
Psych
:: Nodes :: Node (12) -
Psych
:: Nodes :: Sequence (12) -
Psych
:: ScalarScanner (12) -
Psych
:: Visitors :: YAMLTree (84) -
RDoc
:: Options (12) -
YAML
:: DBM (288)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - << (12)
- BadAlias (12)
- DBM (12)
-
LIBYAML
_ VERSION (12) -
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 2
. 7 . 0 (6) -
NEWS for Ruby 3
. 0 . 0 (5) -
NEWS for Ruby 3
. 1 . 0 (4) - TreeBuilder (12)
- VERSION (12)
- [] (12)
- []= (12)
- delete (12)
-
delete
_ if (12) - dump (24)
-
dump
_ stream (12) - each (12)
-
each
_ pair (12) -
each
_ value (12) - fetch (12)
- finished (12)
- finished? (12)
-
has
_ value? (12) - index (12)
-
inspect
_ mode= (12) - invert (12)
- irb (12)
- key (12)
-
libyaml
_ version (12) - load (15)
-
load
_ documents (8) -
load
_ file (24) -
load
_ stream (24) - new (36)
- parse (12)
-
parse
_ stream (24) - psych (12)
-
psych
_ to _ yaml (12) -
psych
_ y (12) - push (12)
- rdoc (12)
- reject (12)
- replace (12)
-
ruby 1
. 8 . 2 feature (12) - rubygems (12)
-
rubygems
/ commands / generate _ index _ command (12) -
rubygems
/ commands / mirror _ command (12) -
rubygems
/ commands / specification _ command (12) -
rubygems
/ server (12) -
safe
_ load (19) - select (24)
- shift (12)
-
start
_ sequence (12) - started (12)
- started? (12)
- store (12)
- tag (12)
-
to
_ a (12) -
to
_ hash (12) -
to
_ yaml (12) - tokenize (12)
- update (12)
- values (12)
-
values
_ at (12) - y (12)
-
yaml
/ dbm (12) - yaml? (12)
-
yaml
_ tag (12)
検索結果
先頭5件
-
yaml (38380.0)
-
構造化されたデータを表現するフォーマットであるYAML (YAML Ain't Markup Language) を扱うためのライブラリです。
...あるYAML (YAML Ain't Markup Language) を扱うためのライブラリです。
//emlist[例1: 構造化された配列][ruby]{
require 'yaml'
data = ["Taro san", "Jiro san", "Saburo san"]
str_r = YAML.dump(data)
str_l = <<~YAML_EOT
---
- Taro san
- Jiro san
- Saburo san
YAML_EOT
p st......: 構造化されたハッシュ][ruby]{
require 'yaml'
require 'date'
str_l = <<~YAML_EOT
Tanaka Taro: {age: 35, birthday: 1970-01-01}
Suzuki Suneo: {
age: 13,
birthday: 1992-12-21
}
YAML_EOT
str_r = {}
str_r["Tanaka Taro"] = {
"age" => 35,
"birthday" => Date.new(1970, 1, 1)
}
s......= {
"age" => 13,
"birthday" => Date.new(1992, 12, 21)
}
p str_r == YAML.load(str_l) # => true
//}
//emlist[例3: 構造化されたログ][ruby]{
require 'yaml'
require 'stringio'
strio_r = StringIO.new(<<~YAML_EOT)
---
time: 2008-02-25 17:03:12 +09:00
target: YAML
version: 4
log:... -
Psych
. libyaml _ version -> [Integer , Integer , Integer] (12200.0) -
libyaml のバージョンを返します。
...libyaml のバージョンを返します。
[major, minor patch-level] という 3 つの整数からなる配列を返します。
@see Psych::LIBYAML_VERSION... -
Psych
:: LIBYAML _ VERSION -> String (12200.0) -
libyaml のバージョン。
...libyaml のバージョン。... -
yaml
/ dbm (12018.0) -
DBM の値に文字列以外も格納できるように拡張するためのサブライブラ リです。
...DBM の値に文字列以外も格納できるように拡張するためのサブライブラ
リです。
DBM はキー、値のどちらも文字列である必要がありますが、
YAML::DBM は YAML 形式に変換できるオブジェクトであれば値として格
納する事ができ......ます。ただし、キーは文字列である必要があります。
使い方は DBM と同じです。DBM と YAML も併せて参照して
ください。... -
Gem
:: Commands :: BuildCommand # yaml?(filename) -> bool (9217.0) -
与えられたファイル名を持つファイルが yaml ファイルである場合に真を返します。
...与えられたファイル名を持つファイルが yaml ファイルである場合に真を返します。
@param filename ファイル名を指定します。... -
Object
# psych _ to _ yaml(options = {}) -> String (9142.0) -
オブジェクトを YAML document に変換します。
...オブジェクトを YAML document に変換します。
options でオプションを指定できます。
Psych.dump と同じなので詳しくはそちらを参照してください。
syck に to_yaml メソッドがあるため、
psych_to_yaml が別名として定義されています。......将来的に
syck が廃止された場合 psych_to_yaml は廃止
される予定であるため、特別の事情がない限り to_yaml を用いてください。
@param options 出力オプション
@see Psych.dump... -
Object
# to _ yaml(options = {}) -> String (9142.0) -
オブジェクトを YAML document に変換します。
...オブジェクトを YAML document に変換します。
options でオプションを指定できます。
Psych.dump と同じなので詳しくはそちらを参照してください。
syck に to_yaml メソッドがあるため、
psych_to_yaml が別名として定義されています。......将来的に
syck が廃止された場合 psych_to_yaml は廃止
される予定であるため、特別の事情がない限り to_yaml を用いてください。
@param options 出力オプション
@see Psych.dump... -
Object
. yaml _ tag(tag) -> () (9119.0) -
クラスと tag の間を関連付けます。
...クラスと tag の間を関連付けます。
これによって tag 付けされた YAML ドキュメントを Ruby のオブジェクトに
変換したりその逆をしたりすることができます。
@param tag 対象のクラスに関連付けるタグの文字列
=== Example
requir......x
end
attr_reader :x
end
# Dumps Ruby object normally
p Psych.dump(Foo.new(3))
# =>
# --- !ruby/object:Foo
# x: 3
# Registers tag with class Foo
Foo.yaml_as("tag:example.com,2013:foo")
# ... and dumps the object of Foo class
Psych.dump(Foo.new(3), STDOUT)
#......=>
# --- !<tag:example.com,2013:foo>
# x: 3
# Loads the object from the tagged YAML node
p Psych.load(<<EOS)
--- !<tag:example.com,2012:foo>
x: 8
EOS
# => #<Foo:0x0000000130f48 @x=8>... -
YAML
:: DBM (9000.0) -
DBM の値に文字列以外も格納できるように拡張したクラスです。
...DBM の値に文字列以外も格納できるように拡張したクラスです。...