fe_core_ext 0.33.3 → 0.34.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: ffad0bf8d5fce2f7497408fc773f343ba62f4cc64e3501b9574ef1c6b0dcdeab
4
- data.tar.gz: 744355564fe08e3e6c7585e59f5385a48573a55b8090e68b6c70bf91f4a1fe66
3
+ metadata.gz: 6aec43dd19e343c331d5bab87938ebe303be0e3d1537c0115874e53bd19e8920
4
+ data.tar.gz: e49433838f1628518bbb90e68c4174eea2f7770a87c8a6f7694a628c0c4597cd
5
5
  SHA512:
6
- metadata.gz: b67c1163648d047ba02bf1b0aa7b0f84742508dbfaaf2b0b993a97bbcee18b2a3ca30e90f03a7b6cda08175d4c3fb21037480f4b018e73d80ce79ffa0f7b16a2
7
- data.tar.gz: 55e7aed956c5da1c2dd7913f53e5a72583c1e255e3a5debba422691859fc40a2fbedb868b40275232ca58b8a8e404add041e2de8552e8a86f17e1bf4d4b23581
6
+ metadata.gz: 6a4dffac05c23c85cf30f6041dad6fd4428ffc8deae06a5bd064025edd99a8193741f36c350b89cc31faeaf8bfc0abc13663640bfef388f912f0af8c61057ae9
7
+ data.tar.gz: f48c7eb406fd5c3c722edd9ab0c8766c80550f585c14974009172772c29f7e2eee46ed6613f4e5146144edf1b1e4f0b4743c1e791e6e4e1b14c623bfc6904269
@@ -5,7 +5,7 @@ require "active_support/time"
5
5
 
6
6
  module FeCoreExt
7
7
  module CoreExt
8
- module Date
8
+ module DateMethods
9
9
  def end_of_month?
10
10
  self == end_of_month
11
11
  end
@@ -75,6 +75,6 @@ module FeCoreExt
75
75
  end
76
76
 
77
77
  class Date
78
- include FeCoreExt::CoreExt::Date
78
+ include FeCoreExt::CoreExt::DateMethods
79
79
  extend FeCoreExt::CoreExt::DateClassMethods
80
80
  end
@@ -6,7 +6,7 @@ require "fileutils"
6
6
 
7
7
  module FeCoreExt
8
8
  module CoreExt
9
- module Pathname
9
+ module PathnameMethods
10
10
  def load_yaml
11
11
  return unless exist?
12
12
  YAML.load_file(self)
@@ -65,6 +65,6 @@ module FeCoreExt
65
65
  end
66
66
 
67
67
  class Pathname
68
+ include FeCoreExt::CoreExt::PathnameMethods
68
69
  extend FeCoreExt::CoreExt::PathnameClassMethods
69
- include FeCoreExt::CoreExt::Pathname
70
70
  end
@@ -14,7 +14,7 @@ module FeCoreExt
14
14
  end
15
15
 
16
16
  def integer?
17
- self.to_integer.to_s == self.delete(",")
17
+ to_integer.to_s == delete(",")
18
18
  end
19
19
 
20
20
  def to_decimal
@@ -22,27 +22,17 @@ module FeCoreExt
22
22
  delete(",").to_d
23
23
  end
24
24
 
25
- def to_decimal_new
26
- return unless valid_number?
27
- delete(",").to_d
28
- end
29
-
30
25
  def to_float
31
26
  return unless valid_number?
32
27
  delete(",").to_f
33
28
  end
34
29
 
35
- def valid_sec_code?
36
- valid_chars = "[0-9ACDFGHJKLMNPRSTUWXY]"
37
- match?(/^\d#{valid_chars}\d#{valid_chars}$/)
38
- end
39
-
40
30
  def to_pathname
41
31
  Pathname(self)
42
32
  end
43
33
 
44
34
  def not_number?
45
- to_i == 0 && match("0").nil?
35
+ to_i.zero? && match("0").nil?
46
36
  end
47
37
 
48
38
  def valid_number?
@@ -58,12 +48,12 @@ module FeCoreExt
58
48
  tr("0-9A-Za-z &・.-()", '0-9A-Za-z &・.\-()')
59
49
  end
60
50
 
61
- def to_katakana
62
- tr("ぁ-ん", "ァ-ン")
51
+ def to_half_alpha
52
+ tr("0-9A-Za-z &・.-()", '0-9A-Za-z &・.\-()')
63
53
  end
64
54
 
65
- def match?(str)
66
- /#{str}/ === self
55
+ def to_katakana
56
+ tr("ぁ-ん", "ァ-ン")
67
57
  end
68
58
 
69
59
  def kana_upcase
@@ -71,12 +61,12 @@ module FeCoreExt
71
61
  end
72
62
 
73
63
  def to_han_kana
74
- return if self.nil?
64
+ return if nil?
75
65
  NKF.nkf("-wxZ4", self)
76
66
  end
77
67
 
78
68
  def to_zen_kana
79
- return if self.nil?
69
+ return if nil?
80
70
  NKF.nkf("-wX", self)
81
71
  end
82
72
 
@@ -97,15 +87,6 @@ module FeCoreExt
97
87
  reverse.gsub(/^\p{Zs}+|^\p{Cf}+/, "").reverse.gsub(/^\p{Zs}+|^\p{Cf}+/, "")
98
88
  end
99
89
 
100
- def sjis_encodable
101
- tr("\u301C\u2212\u00A2\u00A3\u00AC\u2014\u2016",
102
- "\uFF5E\uFF0D\uFFE0\uFFE1\uFFE2\u2015\u2225")
103
- end
104
-
105
- def eucjp_encodable
106
- tr("\uFF5E\uFF0D\uFFE0\uFFE1\uFFE2\u2015\u2225",
107
- "\u301C\u2212\u00A2\u00A3\u00AC\u2014\u2016")
108
- end
109
90
  end
110
91
  end
111
92
  end
@@ -18,10 +18,6 @@ module FeCoreExt
18
18
  end
19
19
  end
20
20
 
21
- module FeCoreExt::CoreExt::TimeClassMethods
22
- end
23
-
24
21
  class Time
25
22
  include FeCoreExt::CoreExt::Time
26
- extend FeCoreExt::CoreExt::TimeClassMethods
27
23
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FeCoreExt
4
- VERSION = "0.33.3"
4
+ VERSION = "0.34.0"
5
5
  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.33.3
4
+ version: 0.34.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tetsu
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-11-09 00:00:00.000000000 Z
11
+ date: 2024-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -116,7 +116,7 @@ homepage: http://github.com/ironsand/fe_core_ext
116
116
  licenses:
117
117
  - MIT
118
118
  metadata: {}
119
- post_install_message:
119
+ post_install_message:
120
120
  rdoc_options: []
121
121
  require_paths:
122
122
  - lib
@@ -131,8 +131,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
131
131
  - !ruby/object:Gem::Version
132
132
  version: '0'
133
133
  requirements: []
134
- rubygems_version: 3.4.10
135
- signing_key:
134
+ rubygems_version: 3.5.16
135
+ signing_key:
136
136
  specification_version: 4
137
137
  summary: Core class extensions
138
138
  test_files: []