lsegal/yard — pull request #534 by kou (2012-05-02 15:17:54+00:00)
Title: i18n: create YARD::I18n::Messages and Message

This commit is corresponding to comment in #527:

> https://github.com/lsegal/yard/pull/527#issuecomment-5427213
>
> One thing I noticed after you documented the code is that
> PotGenerator#messages has a very long type signature. To me, this
> usually implies that the API is equally complex to use. The type:
> `Hash{:locations => Array, :comments =>
> Array}` to me screams of refactoring into a separate class with
> .locations and .comments attributes. That way we can have a properly
> documented Message (would this be the right name? or PotMessage?)
> class component that has meaning in our system, and `#messages` would
> turn into `Hash{String=>Message}`, which is much clearer to me. Can you
> do this refactor?