fe_core_ext 0.15.0 → 0.17.0

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: 5a02ed1927dc5c71d08be535561898efd8b3942bb3c4c5fe496b017fbeea10db
4
- data.tar.gz: 75a8ebae9e7b28cedab17678af81607f23e7823dc0da626189b71a7c201494d8
3
+ metadata.gz: 4bd6c456622dbc9f2ae9d73d4ad9033aa03610cc31efde9c47ba4747dd5bf874
4
+ data.tar.gz: 0bf9ca9a07942ff77b87c6445c83f5388017ba60c88274009c3dc57620ae39d6
5
5
  SHA512:
6
- metadata.gz: 934b8426763094548f9790ba4f5d3aad54f6f352ffcdbac9a39b8f07963258f123638b8161ace32cee8486449a1063f1b3fadb0e3b1adedbdb9bf53a06a91843
7
- data.tar.gz: 788b536fdfd5e7c6462aabd4077ca85388ae7e65983f16bf818d0fd36642757cd5919ab0241f494f8e20bd1acfa987820c217c4bcbc7a3deadbd57dd7c9d0b8d
6
+ metadata.gz: 68ce9bac873d5fd5eed65bb27e91064604cb4c717d5d9a68be370be02ceeaed674ede61fda4bda7411dc5f884fc18817917ff8c6c371d68ee2b4f0e2c0f08246
7
+ data.tar.gz: 2c9ae0703ae6205d45f17314ba091cdb08e2577e5f98e54669e95b0d711c34e8ccd0a45a79662f1ae31c90bed20cd9b42f8229a784cc340def158606c0ef6df1
@@ -17,6 +17,10 @@ module FeCoreExt::CoreExt::String
17
17
  delete(',').to_i
18
18
  end
19
19
 
20
+ def integer?
21
+ self.to_integer.to_s == self.delete(',')
22
+ end
23
+
20
24
  def to_decimal
21
25
  return if not_number?
22
26
  delete(',').to_d
@@ -27,6 +31,11 @@ module FeCoreExt::CoreExt::String
27
31
  delete(',').to_d
28
32
  end
29
33
 
34
+ def to_float
35
+ return unless valid_number?
36
+ delete(',').to_f
37
+ end
38
+
30
39
  def to_pathname
31
40
  Pathname(self)
32
41
  end
@@ -1,3 +1,3 @@
1
1
  module FeCoreExt
2
- VERSION = '0.15.0'
2
+ VERSION = '0.17.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fe_core_ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.0
4
+ version: 0.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tetsu
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-04-06 00:00:00.000000000 Z
11
+ date: 2022-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport