Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ def initialize(attributes={})
# Delegate methods to `@result` or `@result._source`
#
def method_missing(method_name, *arguments)
# Emulate Hashie::Mash key query method
if method_name[-1..-1] == '?'
return @result.__send__(method_name.to_sym) || (@result._source && @result._source.__send__(method_name.to_sym))
end
case
when @result.respond_to?(method_name.to_sym)
@result.__send__ method_name.to_sym, *arguments
Expand Down