ruby-rails-extensions 2.1.0.pre.rc.5 → 2.1.0.pre.rc.7

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: 5efd8fd2457658a5c603068376243c72c50ec491b1e271773a362a65f31399f5
4
- data.tar.gz: 50bf13aba67aec4d5684189821bb7ef6e9d72d45b80194d0dc19523b7e962fc1
3
+ metadata.gz: 3a0b09313bc2ef11d6fffe25059c8aad5af55e57b6b92911af1c32e45868f124
4
+ data.tar.gz: 8574ef5aac7018f3401fed43e640dc86272ac03ffd9c4a5a80b29fbf18d4e086
5
5
  SHA512:
6
- metadata.gz: 84c76f96441af647e22d0cebb660fabb581e1ce50587082012f6bd48e07b681f6e5df9b7ffe090f0062da5f90a55d7d699b3a421ed5d704d45d7e57233313d82
7
- data.tar.gz: 5f5b95eb1012e086992ccb3aa50563bbe83771dcf63ee22e6e8d29450e82ab1fa4bafee8f6cc2f31835651bcf89aae800e98a59b9416a7804a0d569ac5d2c837
6
+ metadata.gz: f74d924b7e2a3d21d60b41325e464e6da4adcb0435c553c09032847bc1bb7869e731c8f630889d6422ff2800f9d4611357663ecf7af94a4b5ba76657fcd34711
7
+ data.tar.gz: 81e0170ab8c7627a1505721ac4fd8d06f40c67a813afc770d1f59319f517b031f1fa7e01946fa27cc39ad20c8f4c196fcac36f504890cc0dd8d7540da4177282
data/CHANGELOG.md CHANGED
@@ -8,6 +8,7 @@ Unreleased Changes
8
8
  * `Hash#nmerge` and `Hash#nmerge!`
9
9
  * `Hash#left_deep_merge` and `Hash#left_deep_merge!`
10
10
  * `Hash#invert_with_dups`
11
+ * `FalseClass#to_d` and `TrueClass#to_d`
11
12
 
12
13
  2.0.1 (2024-07-29)
13
14
  ------------------
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'bigdecimal'
4
+
5
+ FalseClass.class_eval do
6
+ # @return [BigDecimal]
7
+ def to_d
8
+ BigDecimal('0')
9
+ end
10
+ end
11
+
12
+ TrueClass.class_eval do
13
+ # @return [BigDecimal]
14
+ def to_d
15
+ BigDecimal('1')
16
+ end
17
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubyRailsExtensions
4
- VERSION = '2.1.0-rc.5'
4
+ VERSION = '2.1.0-rc.7'
5
5
  end
@@ -31,8 +31,10 @@ module RubyRailsExtensions
31
31
  in_utc
32
32
  input
33
33
  invert_with_dups
34
+ left_deep_merge
34
35
  month_and_year
35
36
  month_year
37
+ nmerge
36
38
  no_keys
37
39
  no_values
38
40
  only_some
@@ -48,6 +50,7 @@ module RubyRailsExtensions
48
50
  select_present_join
49
51
  set_to_sentence
50
52
  to_bool
53
+ to_d
51
54
  to_dec
52
55
  to_i
53
56
  to_local
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.5
4
+ version: 2.1.0.pre.rc.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brands Insurance
@@ -98,6 +98,7 @@ files:
98
98
  - lib/ruby-rails-extensions/extensions/select_present_join.rb
99
99
  - lib/ruby-rails-extensions/extensions/set_to_sentence.rb
100
100
  - lib/ruby-rails-extensions/extensions/to_bool.rb
101
+ - lib/ruby-rails-extensions/extensions/to_d.rb
101
102
  - lib/ruby-rails-extensions/extensions/to_dec.rb
102
103
  - lib/ruby-rails-extensions/extensions/to_i.rb
103
104
  - lib/ruby-rails-extensions/extensions/to_local.rb