種類
- インスタンスメソッド (1196)
- 特異メソッド (354)
- クラス (264)
- 定数 (264)
- モジュール (24)
クラス
- Module (8)
- Object (36)
-
Psych
:: Emitter (84) -
Psych
:: Handler (144) -
Psych
:: Nodes :: Alias (36) -
Psych
:: Nodes :: Document (120) -
Psych
:: Nodes :: Mapping (144) -
Psych
:: Nodes :: Node (96) -
Psych
:: Nodes :: Scalar (228) -
Psych
:: Nodes :: Sequence (144) -
Psych
:: Nodes :: Stream (84) -
Psych
:: Parser (108) -
Psych
:: Parser :: Mark (36) -
Psych
:: ScalarScanner (36) -
Psych
:: Stream (48) -
Psych
:: SyntaxError (72) -
Psych
:: TreeBuilder (24) -
Psych
:: Visitors :: YAMLTree (120)
キーワード
- << (12)
- ANY (60)
- Alias (12)
- BLOCK (24)
- BadAlias (12)
-
DOUBLE
_ QUOTED (12) - Document (12)
- Emitter (12)
- Exception (12)
- FLOW (24)
- FOLDED (12)
- Handler (12)
-
LIBYAML
_ VERSION (12) - LITERAL (12)
- Mapping (12)
- Mark (12)
- Node (12)
- Nodes (12)
- Omap (12)
- PLAIN (12)
- Parser (12)
- Psych (12)
-
SINGLE
_ QUOTED (12) - Scalar (12)
- ScalarScanner (12)
- Sequence (12)
- Set (12)
- Stream (24)
- SyntaxError (12)
- TreeBuilder (12)
- UTF16BE (24)
- UTF16LE (24)
- UTF8 (24)
- VERSION (12)
- Visitor (12)
- Visitors (12)
- YAMLTree (12)
- alias (12)
- anchor (48)
- anchor= (48)
- canonical (12)
- canonical= (12)
- children (12)
- column (24)
- context (12)
- dump (24)
-
dump
_ stream (12) - each (24)
- empty (12)
- encoding (12)
- encoding= (12)
-
end
_ document (12) -
end
_ mapping (12) -
end
_ sequence (12) -
end
_ stream (12) - file (12)
- finish (24)
- finished (12)
- finished? (12)
- handler (12)
- handler= (12)
- implicit (36)
- implicit= (36)
-
implicit
_ end (12) -
implicit
_ end= (12) - indentation (12)
- indentation= (12)
- index (12)
-
libyaml
_ version (12) - line (24)
-
line
_ width (12) -
line
_ width= (12) - load (15)
-
load
_ documents (8) -
load
_ file (12) -
load
_ stream (24) - mark (12)
- new (144)
- offset (12)
- parse (24)
-
parse
_ file (12) -
parse
_ stream (24) -
parse
_ time (12) - parser (12)
- plain (12)
- plain= (12)
- problem (12)
-
psych
_ to _ yaml (12) -
psych
_ y (12) -
psych
_ yaml _ as (4) - push (12)
- quoted (12)
- quoted= (12)
- root (24)
-
safe
_ load (19) - scalar (12)
- start (36)
-
start
_ document (12) -
start
_ mapping (12) -
start
_ sequence (12) -
start
_ stream (12) - started (12)
- started? (12)
- streaming? (12)
- style (36)
- style= (36)
- tag (48)
- tag= (36)
-
tag
_ directives (12) -
tag
_ directives= (12) -
to
_ json (12) -
to
_ ruby (12) -
to
_ yaml (24) - tokenize (12)
- transform (12)
- tree (12)
- value (12)
- value= (12)
- version (12)
- version= (12)
- y (12)
- yaml (12)
-
yaml
_ as (4) -
yaml
_ tag (12)
検索結果
先頭5件
-
Kernel
# psych _ y(*objects) -> String (2.0) -
objects を YAML document に変換します。
...のメソッドは irb 上でのみ定義されます。
syck に y メソッドがあるため、
psych_y が別名として定義されています。将来的に
syck が廃止された場合 psych_y は廃止
される予定であるため、特別の事情がない限り y を用いてくだ... -
Kernel
# y(*objects) -> String (2.0) -
objects を YAML document に変換します。
...のメソッドは irb 上でのみ定義されます。
syck に y メソッドがあるため、
psych_y が別名として定義されています。将来的に
syck が廃止された場合 psych_y は廃止
される予定であるため、特別の事情がない限り y を用いてくだ... -
Module
# psych _ yaml _ as(tag) -> () (2.0) -
クラスと tag の間を関連付けます。
クラスと tag の間を関連付けます。
これによって tag 付けされた YAML ドキュメントを Ruby のオブジェクトに
変換したりその逆をしたりすることができます。
この method は deprecated です。 Object.yaml_tag を
かわりに使ってください。
@param tag 対象のクラスに関連付けるタグの文字列 -
Module
# yaml _ as(tag) -> () (2.0) -
クラスと tag の間を関連付けます。
クラスと tag の間を関連付けます。
これによって tag 付けされた YAML ドキュメントを Ruby のオブジェクトに
変換したりその逆をしたりすることができます。
この method は deprecated です。 Object.yaml_tag を
かわりに使ってください。
@param tag 対象のクラスに関連付けるタグの文字列 -
Object
# psych _ to _ yaml(options = {}) -> String (2.0) -
オブジェクトを YAML document に変換します。
...ョンを指定できます。
Psych.dump と同じなので詳しくはそちらを参照してください。
syck に to_yaml メソッドがあるため、
psych_to_yaml が別名として定義されています。将来的に
syck が廃止された場合 psych_to_yaml は廃止
される予......定であるため、特別の事情がない限り to_yaml を用いてください。
@param options 出力オプション
@see Psych.dump... -
Object
# to _ yaml(options = {}) -> String (2.0) -
オブジェクトを YAML document に変換します。
...ョンを指定できます。
Psych.dump と同じなので詳しくはそちらを参照してください。
syck に to_yaml メソッドがあるため、
psych_to_yaml が別名として定義されています。将来的に
syck が廃止された場合 psych_to_yaml は廃止
される予......定であるため、特別の事情がない限り to_yaml を用いてください。
@param options 出力オプション
@see Psych.dump... -
Object
. yaml _ tag(tag) -> () (2.0) -
クラスと tag の間を関連付けます。
...g 対象のクラスに関連付けるタグの文字列
=== Example
require 'psych'
class Foo
def initialize(x)
@x = x
end
attr_reader :x
end
# Dumps Ruby object normally
p Psych.dump(Foo.new(3))
# =>
# --- !ruby/object:Foo
# x: 3
# Registers tag......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:0x00... -
Psych (2.0)
-
yaml のバックエンドのためのモジュールです。
yaml のバックエンドのためのモジュールです。 -
Psych
. dump(o , io , options = {}) -> () (2.0) -
Ruby のオブジェクト o を YAML ドキュメントに変換します。
...[例][ruby]{
# Dump an array, get back a YAML string
Psych.dump(['a', 'b']) # => "---\n- a\n- b\n"
# Dump an array to an IO object
Psych.dump(['a', 'b'], StringIO.new) # => #<StringIO:0x000001009d0890>
# Dump an array with indentation set
Psych.dump(['a', ['b']], :indentation => 3) # => "---\n-......a\n- - b\n"
# Dump an array to an IO with indentation set
Psych.dump(['a', ['b']], StringIO.new, :indentation => 3)
//}... -
Psych
. dump(o , options = {}) -> String (2.0) -
Ruby のオブジェクト o を YAML ドキュメントに変換します。
...[例][ruby]{
# Dump an array, get back a YAML string
Psych.dump(['a', 'b']) # => "---\n- a\n- b\n"
# Dump an array to an IO object
Psych.dump(['a', 'b'], StringIO.new) # => #<StringIO:0x000001009d0890>
# Dump an array with indentation set
Psych.dump(['a', ['b']], :indentation => 3) # => "---\n-......a\n- - b\n"
# Dump an array to an IO with indentation set
Psych.dump(['a', ['b']], StringIO.new, :indentation => 3)
//}...