elasticsearch-explain-response 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8ea1238650fd2756ec6248ac4b08de91c29dd353
4
- data.tar.gz: 413adb252c2a14172f19429ab32ec8813c1ec920
3
+ metadata.gz: cc87191b066dfae57d24e9a43e8a80ab31650485
4
+ data.tar.gz: ee742929b28634f9a8be93f4e444e341d5aaaccf
5
5
  SHA512:
6
- metadata.gz: 720dfd516b2d11b1f74121106a17f159e72018032dc19539651e3d83e829fd1aaf6870f4cd9766aa704672e4ecf6146fed96cd7bc017909b3b37bb41ace3cdb8
7
- data.tar.gz: a4f2fcbf13b033977a2bd731700c658fb641baee8e2943807f6439e8ac25708f424ee5c3c62180dfd0bfd5125886cf0cb67b7a9ce9fc88b4a519eacc709d1029
6
+ metadata.gz: d2a46822e8d8e9dec92bede0d6dfe875758d27655aa3904aa80598accf3231a62fdef635d3c0cc6012ca557facab29b1b78ad8b58c833f43c56343a3cc93ba1a
7
+ data.tar.gz: 7a080f458d3b533d55443f804134065275a9fe20f26017f7fe2a135210a06f5657a115182543926cd3df58d8a357f07381395c5baf5ac2cff81b8a63d0ad2c49
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "elasticsearch-explain-response"
7
- spec.version = "0.2.1"
7
+ spec.version = "0.2.2"
8
8
  spec.authors = ["Tomoya Hirano"]
9
9
  spec.email = ["hiranotomoya@gmail.com"]
10
10
  spec.summary = %q{Parser for Elasticserach Explain response}
@@ -20,6 +20,17 @@ module Elasticsearch
20
20
  @children = []
21
21
  end
22
22
 
23
+ def clone_with(attributes = {})
24
+ node = self.class.new(
25
+ score: attributes[:score] || score,
26
+ description: attributes[:description] || description,
27
+ details: attributes[:details] || details,
28
+ level: attributes[:level] || level
29
+ )
30
+ node.children = attributes[:children] || children
31
+ node
32
+ end
33
+
23
34
  def score_one?
24
35
  score == 1.0
25
36
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elasticsearch-explain-response
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomoya Hirano