better_record 0.21.2 → 0.21.3

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: 521ff1e0cbdf88a48e82d12f5c2fa5f209f69713cac846119d04a8c251fc6395
4
- data.tar.gz: 19a85f7f166cd00068d4798917223ec4780178a08bb7734d700d146e0742c193
3
+ metadata.gz: 1e7333954348a14017d9656ebb1dad398b7b2cde2f079cd1d28f9c4a996644a6
4
+ data.tar.gz: 6d75a37541af0305d17227205631db27b3a1908886de354baf59a695bb4b22b5
5
5
  SHA512:
6
- metadata.gz: f4d05dad7c7fb940210c0dd227de208376f56433aa7e9135979253c128307bc6a35b135f09df258299f7ddf31f550306c4f9747f6e48e336cf630b0bfe1725d0
7
- data.tar.gz: 1fdfcac88985fc30d470377deed92feb8f696ca765cc6ec37ee330a1f45a4e34654ae7bfe0570439ddd90f5f343a57411b764102a709b176ae466f50a08d6464
6
+ metadata.gz: 282f473b7382023664f51d68e5e30d62d98039a749c0ca6101a537588430d7eb7905cf1a0efd8088dcde563a2ac1308a1cea7a02708bfa3a1a7f421baa516227
7
+ data.tar.gz: ec97ecd9c65d53b34b1c1d78299c5e30b150ace7982b6863a569084a6aab5107005cdaad851ad9bf0961dec39cc0f90eced8fa2b755180d6e6cff12c465f2e4c
@@ -80,6 +80,16 @@ module BetterRecord
80
80
  val
81
81
  end
82
82
 
83
+ def keys(pattern = ".*")
84
+ data.keys.filter {|k| k.to_s =~ /^#{pattern}$/}
85
+ end
86
+
87
+ def del(*keys)
88
+ i = 0
89
+ keys.map {|k| data.delete(k) && (i += 1) }
90
+ i
91
+ end
92
+
83
93
  def method_missing
84
94
  return nil
85
95
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BetterRecord
4
- VERSION = '0.21.2'
4
+ VERSION = '0.21.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: better_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.2
4
+ version: 0.21.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sampson Crowley
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-17 00:00:00.000000000 Z
11
+ date: 2019-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails