# Code Review: YamlRails

**URL:** <https://www.ruby-forum.com/t/code-review-yamlrails/148474>\
**Category:** IronRuby\
**Created:** [September 13, 2008, 8:12am UTC](https://www.ruby-forum.com/t/code-review-yamlrails/148474 "2008-09-13T08:12:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oleg\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/f19dbf/32.png) [@Oleg\_T](https://www.ruby-forum.com/u/Oleg_T)\
**Post date:** [September 13, 2008, 8:12am UTC](https://www.ruby-forum.com/t/code-review-yamlrails/148474/1 "2008-09-13T08:12:43Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Oleg\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/f19dbf/32.png) [@Oleg\_T](https://www.ruby-forum.com/u/Oleg_T)\
**Post date:** [September 15, 2008, 7:02pm UTC](https://www.ruby-forum.com/t/code-review-yamlrails/148474/2 "2008-09-15T19:02:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Oleg\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/f19dbf/32.png) [@Oleg\_T](https://www.ruby-forum.com/u/Oleg_T)\
**Post date:** [September 15, 2008, 7:53pm UTC](https://www.ruby-forum.com/t/code-review-yamlrails/148474/3 "2008-09-15T19:53:10Z")

</div>

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
