kanji_master 0.3.3 → 0.3.4

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
  SHA1:
3
- metadata.gz: 7edd301f2d0b8db2bce18cd536897c08c8e07d7f
4
- data.tar.gz: a89b8ff3e66a7752c9a81f58dfcc4090cb36e713
3
+ metadata.gz: ed6b87bc55350e2966d6399fe620fd1f6ce7a023
4
+ data.tar.gz: 70dd369d81b58b0bd62cbaf937085fcf694dce67
5
5
  SHA512:
6
- metadata.gz: b5da0a2eeedc9c31c05605833406bf9563c3693fc6db250b8a95b0142badf22af58b2c33018cb34ce2c98cd8a9ab6b25a7c5167fdf7c607071767ada84b9c998
7
- data.tar.gz: 38342a833435368d972e13ab3809c0d77b666c55abb49399d3e67957a3abc6f1003a72640e849ab2da0863845616e6b6308a1722b146bc680d67bcff520102a7
6
+ metadata.gz: 19b13e132c61d4c7492a14aaab9b58878626f78e7a48a914734c36a58516ca29f46bc676b5e43fd99751d07cc241f75728192ce759aec1849174d36a58505191
7
+ data.tar.gz: 09d3540789931b2e97ef1b2be1dbc5ff9267d574e703d566092653ff9bb2bdb33fbe97df280bf739bfc34f3bf88328c026b09c6170c99084a67788f483cd5ddc
@@ -4,6 +4,10 @@ module KanjiMaster
4
4
  !(RegexConstant::NON_ENGLISH_REGEX === text)
5
5
  end
6
6
 
7
+ def number?(text)
8
+ (RegexConstant::NUMBER_REGEX === text)
9
+ end
10
+
7
11
  def maybe_kanji?(text)
8
12
  !alphabet?(text)
9
13
  end
@@ -13,6 +17,8 @@ module KanjiMaster
13
17
  end
14
18
 
15
19
  def zip_code?(text); zipcode?(text) end
20
+ def postal_code?(text); zipcode?(text) end
21
+ def postcode?(text); zipcode?(text) end
16
22
  def zipcode?(text)
17
23
  RegexConstant::JP_ZIPCODE_REGEX === text
18
24
  end
@@ -2,6 +2,8 @@ module KanjiMaster
2
2
  class RegexConstant
3
3
  NON_ENGLISH_REGEX = /[^\u0000-\u007F]$/i
4
4
 
5
+ NUMBER_REGEX = /^[0-9]$/i
6
+
5
7
  # Japanese Regex
6
8
  KANJI_REGEX = /[\p{Han}]+/
7
9
  HIRAGANA_REGEX = /[\p{Hiragana}]+/
@@ -1,3 +1,3 @@
1
1
  module KanjiMaster
2
- VERSION = "0.3.3"
2
+ VERSION = "0.3.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kanji_master
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - DONGSHIH TENG
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-08-18 00:00:00.000000000 Z
11
+ date: 2018-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: romaji