ruby-rails-extensions 2.1.0.pre.rc.11 → 2.1.0.pre.rc.12

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: 712661b4aaac22929e22e0dcb7beccab787bb7c3540e974dbd9222c40fac8786
4
- data.tar.gz: b13ae1eabbb53bf36ea149eabd1e43619fb03d2d0d8d48b8d848bb549b009cfd
3
+ metadata.gz: eaf63da60d4f5a4025624021d80aa6d5fbc93393f6da419c15207042a503e18f
4
+ data.tar.gz: ee1cb13799cf814b9fe027b91ba42f55dd167759d3cad7bb5d463af47bd9e3ba
5
5
  SHA512:
6
- metadata.gz: d7ff6de8c4d730a1aec6779a2d15d57788163048b707c2b84de7ab72d637d74e7213ddf0c718b4ad9263231f795e3ab980097d3ab6b83630f4654f74237c2edb
7
- data.tar.gz: a2da1b18f5728a0d0ef7faa85646dbfd490f9d9bb01a9fe8a816063e817da32b842242f7cacb95290f8cad600f78eb57e279f08ecab41670f627540d7577e1be
6
+ metadata.gz: 4f8123053ed9491f33d10815f621ae1e8f5fcc4555a75c44c5cb003467a1bfc6e5a555e56e11f2807ff1df9bf982438557ef39d1587c1436eaf0e3da01b8e758
7
+ data.tar.gz: 3c94ad665e2610c2eb3dbeaf21c45ef68cd90a0036d3f3a336ef7de54165583a55e19d214f2878a85ed6f24585e058bdae10892efdab77261a4beef7b9a410b6
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ Array.class_eval do
4
+ # Flattens and compacts an array
5
+ # @see Array#flatten!
6
+ # @see Array#compact!
7
+ #
8
+ # @return [Array]
9
+ #
10
+ def flatten_compact!
11
+ flatten!
12
+
13
+ compact!
14
+
15
+ self
16
+ end
17
+
18
+ alias flat_pact! flatten_compact!
19
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubyRailsExtensions
4
- VERSION = '2.1.0-rc.11'
4
+ VERSION = '2.1.0-rc.12'
5
5
  end
@@ -25,6 +25,7 @@ module RubyRailsExtensions
25
25
  find_bang
26
26
  find_dupes
27
27
  first_dupe
28
+ flatten_compact
28
29
  google_format
29
30
  hash_only
30
31
  humanize_symbol
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-rails-extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0.pre.rc.11
4
+ version: 2.1.0.pre.rc.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brands Insurance
@@ -39,6 +39,7 @@ files:
39
39
  - lib/ruby-rails-extensions/extensions/find_bang.rb
40
40
  - lib/ruby-rails-extensions/extensions/find_dupes.rb
41
41
  - lib/ruby-rails-extensions/extensions/first_dupe.rb
42
+ - lib/ruby-rails-extensions/extensions/flatten_compact.rb
42
43
  - lib/ruby-rails-extensions/extensions/google_format.rb
43
44
  - lib/ruby-rails-extensions/extensions/hash_only.rb
44
45
  - lib/ruby-rails-extensions/extensions/humanize_symbol.rb