Module: Psychgus::Ext::ObjectExt
- Defined in:
- lib/psychgus/ext/core_ext.rb
Overview
Core extensions to Object.
Instance Method Summary collapse
-
#to_yaml(options = {}) ⇒ String
Convert an Object to YAML.
Instance Method Details
#to_yaml(options = {}) ⇒ String
Convert an Object to YAML.
options
can also be a Hash, so can be a drop-in-replacement for Psych.
54 55 56 57 58 59 60 |
# File 'lib/psychgus/ext/core_ext.rb', line 54 def to_yaml(={}) # NOTE: This method signature must use old-style `options={}` instead of `**options`! # Because some Gems, like `Moneta`, depend on this. # Do not use Psych.dump() if no Stylers, because a class might be a Blueberry return Psychgus.dump(self,**) end |