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 +4 -4
- data/CHANGELOG.md +1 -0
- data/lib/ruby-rails-extensions/extensions/to_d.rb +17 -0
- data/lib/ruby-rails-extensions/version.rb +1 -1
- data/lib/ruby-rails-extensions.rb +3 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a0b09313bc2ef11d6fffe25059c8aad5af55e57b6b92911af1c32e45868f124
|
4
|
+
data.tar.gz: 8574ef5aac7018f3401fed43e640dc86272ac03ffd9c4a5a80b29fbf18d4e086
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f74d924b7e2a3d21d60b41325e464e6da4adcb0435c553c09032847bc1bb7869e731c8f630889d6422ff2800f9d4611357663ecf7af94a4b5ba76657fcd34711
|
7
|
+
data.tar.gz: 81e0170ab8c7627a1505721ac4fd8d06f40c67a813afc770d1f59319f517b031f1fa7e01946fa27cc39ad20c8f4c196fcac36f504890cc0dd8d7540da4177282
|
data/CHANGELOG.md
CHANGED
@@ -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
|
@@ -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.
|
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
|