dxlite 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
  SHA256:
3
- metadata.gz: e036712cdb12ebc28440edcfff5e89a9d7e3cd4bc92c5eeca4545b2158b3ad8d
4
- data.tar.gz: '020807c1206d1388f60fc55facbe865fc2be92ee9ca9c4d8d4af8741073492cc'
3
+ metadata.gz: bf76970719d297956cab4003755b984e7b7849a9f0f8dbc61c7e99ce20ca96d8
4
+ data.tar.gz: acd9d7cd693d355134ca1c33863203f8991cc3b42b988ae91e4449c8d6174a82
5
5
  SHA512:
6
- metadata.gz: 33fabd7df1cbd07065b2627c4c6a56941b6ba68812b86ae3672fba34bc8f0ed06afc940af162217ed34385337f310b4154e5c900cea4d2cb7fbc8f12339be048
7
- data.tar.gz: f16f8874284397716679de4b6f6a7e79e6145767b46d12fca47aca0895a1221ce592fd4e38bf0c8d5751fc81a3bf1a3fa4a978e50eb6b6c63e8e606de6b427d3
6
+ metadata.gz: 11fba990077d4ae039878410b876a0d61d8a57c9dfe40333b68ce5b50ad0d4e88b698b3d33711d9a899807cf3194a6e29b6d08aff8c53f2cfae7bf5dbfab6b67
7
+ data.tar.gz: 32142c4b0ec6ef0db19daa9f807b6723b5087aac6665abbb7979a4c39e05ff196691a745fcd439c57d780e45d2edf3e1dd54b8db1a3d2629570896df21997107
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -62,11 +62,19 @@ class DxLite
62
62
  @fields.each do |x|
63
63
 
64
64
  define_singleton_method ('find_all_by_' + x).to_sym do |value|
65
- @records.select {|rec| rec[x.to_sym] == value }
65
+
66
+ @records.select do |rec|
67
+ value.is_a?(Regexp) ? rec[x.to_sym] =~ value : rec[x.to_sym] == value
68
+ end
69
+
66
70
  end
67
71
 
68
72
  define_singleton_method ('find_by_' + x).to_sym do |value|
69
- @records.find {|rec| rec[x.to_sym] == value }
73
+
74
+ @records.find do |rec|
75
+ value.is_a?(Regexp) ? rec[x.to_sym] =~ value : rec[x.to_sym] == value
76
+ end
77
+
70
78
  end
71
79
 
72
80
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dxlite
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
  - James Robertson
@@ -35,7 +35,7 @@ cert_chain:
35
35
  dwbAN6/wokoLVZAiMRG1vZlI6RhtSOTHvFHbfBE5JI9rhjRtui8yeV+t8iI8G4Zs
36
36
  2NszuYzdlVfzlrUiPWY5jL9P
37
37
  -----END CERTIFICATE-----
38
- date: 2020-06-21 00:00:00.000000000 Z
38
+ date: 2020-06-22 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: recordx
metadata.gz.sig CHANGED
Binary file