dxtitle_search 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: febca2af1d5f671487bb3a374e0ce3a3a1c9d1bc61a365a7e264da32f2865d44
4
- data.tar.gz: 8fb8561355abb9b169b789fa9388e6c70f12c92521d4dea14594ab74e8ad69d9
3
+ metadata.gz: 9cd5e3044b7406906abcb06f58d0cc0e8ea32c81ec24257963d618e16fb42c6b
4
+ data.tar.gz: 0fa65bd380eb2b2ee75b8903f016ec1bd670983389d9fa432aa14882c2037d23
5
5
  SHA512:
6
- metadata.gz: c6705c471563eede40e9dd71aa133dc3e5adf9a2f014864c44312aab6a3235bd335648b2dc9a40f6d3d1a339ea50258cfe2c31f56d61f617f67dba5be4237379
7
- data.tar.gz: 9268dc3c81722d2e42824a3e6ac175e7c12e4927254fcdb7f95825f3797b060e2c912ba62af4517841c4f076cd3379ee4be48c44e866796037fb7cb27ad2520c
6
+ metadata.gz: c00e23521b9c6f23c393569012de26da381ffc19a48062430eddc4c2a4115bd0f9cd2d763dbf21ed51642dcdd3cd773bcb5666a218d2dc852627d60a21d2c975
7
+ data.tar.gz: 4818b71bfd9eb2849f39999f6500677af1a907f1f3766a68475e05a2a5d6ba7d6d5629bb7f2a52ccded943ad28bec8483a624e3f311b810b5a38723d0ec382ed
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -7,7 +7,7 @@ require 'dynarex'
7
7
 
8
8
  class DxTitleSearch
9
9
 
10
- def initialize(obj=nil, sources: nil, debug: false)
10
+ def initialize(obj=nil, sources: obj, debug: false)
11
11
 
12
12
  @debug = debug
13
13
 
@@ -83,6 +83,11 @@ class DxTitleSearch
83
83
 
84
84
  end
85
85
 
86
+ def tag_search(keywords)
87
+ a = @a.flat_map {|x| x.split(/#/,2).last.split(/\s*#/)}
88
+ a.grep(/^#{keywords}/i).map(&:downcase).uniq
89
+ end
90
+
86
91
  private
87
92
 
88
93
  def read(source)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dxtitle_search
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -35,7 +35,7 @@ cert_chain:
35
35
  ODgOmcgAsTin0T9l0vWQJnj2OClh1pcC6tFnQXXcYuwTpbtM2v4OmUfUDvJmwQ42
36
36
  POydZUYZg49X9TlTDqPMKed0
37
37
  -----END CERTIFICATE-----
38
- date: 2019-08-07 00:00:00.000000000 Z
38
+ date: 2019-08-11 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: dynarex
metadata.gz.sig CHANGED
Binary file