Code Review: YamlRails

tfpt review “/shelveset:YamlRails;REDMOND\olegtk”
Comment :
Adds missing functionality used by Rails:

  • yaml_as method, which is basically a declarative alias to
    tag_class().
  • quick_emit method, which allows to emit yaml nodes.

Looks good. Did you confirm that a return from the block passed to
quick_emit does not get passed back to the caller?

Yes, while this is terribly underspecified, I confirmed that quick_emit
returns string YAML representation of the user-emitted YAML nodes. The
major use for this is to override to_yaml method in order to provide
custom YAML representation for a type.


Oleg