種類
- インスタンスメソッド (9)
- 特異メソッド (4)
ライブラリ
-
psych
/ core _ ext (4) -
syck
/ rubytypes (6) -
yaml
/ rubytypes (3)
キーワード
-
psych
_ to _ yaml (2) -
to
_ yaml _ properties (3) -
to
_ yaml _ style (3)
検索結果
先頭5件
-
Object
# to _ yaml(opts = {}) (18114) -
自身を YAML ドキュメントに変換します。
...'
h = {
:ugo => 17,
:hoge => "fuga",
}
print h.to_yaml
#=> ---
#=> :ugo: 17
#=> :hoge: fuga
class MyDog
attr_accessor :name, :age
end
c = MyDog.new
c.name = "Pochi"
c.age = 3
print c.to_yaml
#=> --- !ruby/object:MyDog
#=> age: 3
#=> name: Pochi... -
Object
. to _ yaml(options = {}) -> String (18103) -
@todo
...@todo
Convert an object to YAML. See Psych.dump for more information
on the available options.
@see Psych.dump... -
Object
# to _ yaml _ properties -> [String] (6114) -
自身のインスタンス変数の一覧を文字列の配列で返します。
...身のインスタンス変数名の配列
require 'yaml'
h = {
:ugo => 17,
:hoge => "fuga",
}
p h.to_yaml_properties
#=> []
class MyDog
attr_accessor :name, :age
end
c = MyDog.new
c.name = "Pochi"
c.age = 3
p c.to_yaml_properties
#=> ["@age", "@name"]... -
Object
# to _ yaml _ style -> nil (6114) -
nilを返します。
...nilを返します。
@return nilを返します。
例:
require 'yaml'
p to_yaml_style
#=> nil
a = []
p a.to_yaml_style
#=> nil... -
Object
. psych _ to _ yaml(options = {}) -> String (6103) -
@todo
...@todo
Convert an object to YAML. See Psych.dump for more information
on the available options.
@see Psych.dump...
