mongodb/mongo-ruby-driver — pull request #503 by estolfo (2014-10-02 10:01:41+00:00)
Title: Allow Documents to be checked for max size when serialized

@durran let me know if you can think of a better way to check for max size when serializing.

I'm not sure adding a method [#size_limited?](https://github.com/estolfo/mongo-ruby-driver/compare/max-bson-size?expand=1#diff-5187c4deaf844e24f2a98c6a49bbfc38L145) on a Document type and then using #respond_to? is the best way. Though I didn't want to change the API of each type to take in a max size as an argument to the #serialize method.