elasticsearch/elasticsearch-rails — pull request #70 by emptyflask (2014-04-04 18:31:05+00:00)
Title: Refactored Response::Result

An alternative solution to #41 and #64. Sorry for changing the test so much, but it seemed better to test something that more accurately reflected an Elasticsearch response.

---

This avoids polluting the top level of the result
object with Hashie::Mash, but still delegates to
`@result._source`

Previously, the Mash existence methods
(such as `@result.name?`) were being hijacked by
method_missing and always returned false.

This also preserves `@result.highlight?`.