lib/elastics/result.rb in elastics-client-1.3.0 vs lib/elastics/result.rb in elastics-client-1.3.1
- old
+ new
@@ -2,14 +2,14 @@
class Result < ::Hash
attr_reader :template, :response
attr_accessor :variables
- def initialize(template, variables, response, result=nil)
+ def initialize(template, variables, response, raw_result=nil)
@template = template
@variables = variables
@response = response
- replace result || !response.body.empty? && MultiJson.decode(response.body) || return
+ replace raw_result || !response.body.empty? && MultiJson.decode(response.body) || return
Conf.result_extenders.each do |ext|
next if ext.respond_to?(:should_extend?) && !ext.should_extend?(self)
extend ext
end
end