Ruby 1.8.7 リファレンスマニュアル > ライブラリ一覧 > yaml/rubytypesライブラリ > Integerクラス > to_yaml

instance method Integer#to_yaml

to_yaml(opts = {}) -> String [added by yaml/rubytypes]

自身を YAML ドキュメントに変換します。

[PARAM] opts:
YAML ドキュメント出力の際のオプションを指定します。 オプションの詳細は YAML::Syck::Emitter#reset を参照し てください。
print 1.to_yaml # => --- 1
print -1.to_yaml # => --- -1
class Integer