ライブラリ
-
irb
/ context (12) - psych (890)
-
rubygems
/ commands / build _ command (12) -
rubygems
/ commands / specification _ command (12) -
rubygems
/ config _ file (12) -
rubygems
/ exceptions (12) -
rubygems
/ package / tar _ input (12) -
rubygems
/ server (12) -
rubygems
/ specification (36) - yaml (12)
-
yaml
/ dbm (300) -
yaml
/ store (33)
クラス
-
Gem
:: Commands :: BuildCommand (12) -
Gem
:: ConfigFile (12) -
Gem
:: Package :: TarInput (12) -
Gem
:: Server (12) -
Gem
:: Specification (36) -
IRB
:: Context (12) - Module (8)
- Object (36)
-
Psych
:: Handler (96) -
Psych
:: Nodes :: Document (36) -
Psych
:: Nodes :: Mapping (12) -
Psych
:: Nodes :: Node (36) -
Psych
:: Nodes :: Sequence (12) -
Psych
:: Parser (24) -
Psych
:: ScalarScanner (12) -
Psych
:: Stream (48) -
Psych
:: Visitors :: YAMLTree (120) -
RDoc
:: Options (12) -
YAML
:: DBM (288) -
YAML
:: Store (21)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - << (12)
- Alias (12)
- BadAlias (12)
- DBM (12)
- Document (12)
- Emitter (12)
- EndOfYAMLException (12)
-
LIBYAML
_ VERSION (12) - Mapping (12)
- Mark (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) - Node (12)
- Nodes (12)
- Omap (12)
- Parser (12)
- Psych (12)
- Scalar (12)
- ScalarScanner (12)
- Sequence (12)
- Set (12)
- SpecificationCommand (12)
- Store (12)
- Stream (24)
- SyntaxError (12)
- TreeBuilder (12)
- VERSION (12)
- YAML (12)
- YAMLTree (12)
- [] (12)
- []= (12)
- alias (12)
- delete (12)
-
delete
_ if (12) - dump (24)
-
dump
_ stream (12) - each (12)
-
each
_ pair (12) -
each
_ value (12) -
end
_ document (12) -
end
_ stream (12) - fetch (12)
- finish (24)
- finished (12)
- finished? (12)
-
from
_ yaml (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
_ gemspec (12) -
load
_ stream (24) - new (93)
-
normalize
_ yaml _ input (12) - parse (24)
-
parse
_ file (12) -
parse
_ stream (24) - psych (12)
-
psych
_ to _ yaml (12) -
psych
_ y (12) -
psych
_ yaml _ as (4) - 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) - scalar (12)
- select (24)
- shift (12)
- start (36)
-
start
_ document (12) -
start
_ mapping (12) -
start
_ sequence (12) -
start
_ stream (12) - started (12)
- started? (12)
- store (12)
- tag (12)
-
to
_ a (12) -
to
_ hash (12) -
to
_ yaml (24) - tokenize (12)
- tree (12)
- update (12)
- values (12)
-
values
_ at (12) - version (12)
- version= (12)
- y (12)
-
yaml
/ dbm (12) -
yaml
/ store (12) - yaml? (12)
-
yaml
_ as (4) -
yaml
_ initialize (12) -
yaml
_ tag (12)
検索結果
先頭5件
-
yaml (38374.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......true
//}
//emlist[例2: 構造化されたハッシュ][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" =>......thday" => 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
:: Nodes :: Node # yaml(io=nil , options={}) -> String | IO (18124.0) -
AST を YAML ドキュメントに変換します。
...AST を YAML ドキュメントに変換します。
io に IO オブジェクトを指定した場合は、その
オブジェクトに変換後のドキュメントが書き込まれます。
この場合は io を返り値として返します。
io を省略した(nil を指定した)場合......しようとすると、AST として不正で
あるためエラーが発生します。
options には以下が指定できます。
: :version
YAML document に付加するバージョンを [major, minor] という配列、
もしくは文字列で指定します
: :header
出力にヘ... -
Gem
:: Server # yaml(request , response) -> () (18101.0) -
メソッド名に対応する URI に対するリクエストを処理するメソッドです。
メソッド名に対応する URI に対するリクエストを処理するメソッドです。
@param request WEBrick::HTTPRequest オブジェクトが自動的に指定されます。
@param response WEBrick::HTTPResponse オブジェクトが自動的に指定されます。 -
YAML (14056.0)
-
YAML (YAML Ain't Markup Language) を扱うモジュールです。
...YAML (YAML Ain't Markup Language) を扱うモジュールです。
YAML オブジェクトは実際は Psych オブジェクトです。その他のオブジェ
クトも同様に実体は別のオブジェクトです。もし確認したいメソッドの記述が
見つからない場合は、p......sych ライブラリを確認してください。
//emlist[例][ruby]{
require "yaml"
p YAML # => Psych
p YAML::Stream # => Psych::Stream
//}... -
Object
# psych _ to _ yaml(options = {}) -> String (6142.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 (6142.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... -
Psych
:: Nodes :: Node # to _ yaml(io=nil , options={}) -> String | IO (6124.0) -
AST を YAML ドキュメントに変換します。
...AST を YAML ドキュメントに変換します。
io に IO オブジェクトを指定した場合は、その
オブジェクトに変換後のドキュメントが書き込まれます。
この場合は io を返り値として返します。
io を省略した(nil を指定した)場合......しようとすると、AST として不正で
あるためエラーが発生します。
options には以下が指定できます。
: :version
YAML document に付加するバージョンを [major, minor] という配列、
もしくは文字列で指定します
: :header
出力にヘ... -
Gem
:: Specification . from _ yaml(input) -> Gem :: Specification (6123.0) -
YAML ファイルから gemspec をロードします。
...
YAML ファイルから gemspec をロードします。
YAML ファイルから Gem::Specification をロードすると、通常の Ruby オブジェクトの
初期化ルーチン (#initialize) を通りません。このメソッドは初期化ルーチンの一部を実行し、
gemspec の... -
Object
. yaml _ tag(tag) -> () (6119.0) -
クラスと tag の間を関連付けます。
...クラスと tag の間を関連付けます。
これによって tag 付けされた YAML ドキュメントを Ruby のオブジェクトに
変換したりその逆をしたりすることができます。
@param tag 対象のクラスに関連付けるタグの文字列
=== Example
requir......: 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:exampl...