randwordjp 0.1.0 → 0.1.1
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 +4 -4
- data/lib/randwordjp/version.rb +1 -1
- data/lib/randwordjp.rb +16 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c27b7abca81bf87781479dab0f010da194d635cd
|
4
|
+
data.tar.gz: ac26c32e4eb117cf6ed6f9500c51acf2d7e8c495
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 470d761e1579dedbb65a500ef2f63df66905f242b035d8156ae48489ced34144993e637be54da63aa11928868a82cb19739c1903ee8a78e51bb588b8626ff42f
|
7
|
+
data.tar.gz: 9483103e3a4b02a36fb6602cc4d46e1482a596ad13ee258a6f4ae18f4a25d81d07ea044b3cc31b3a7f61f9571704929ba11c38d07b1f6857613d8251d2fef971
|
data/lib/randwordjp/version.rb
CHANGED
data/lib/randwordjp.rb
CHANGED
@@ -30,6 +30,21 @@ module Randwordjp
|
|
30
30
|
words.join
|
31
31
|
end
|
32
32
|
|
33
|
+
# マイナンバーの文字列を取得する(チェックデジットはまだ仮設定)
|
34
|
+
def self.mynumber()
|
35
|
+
words = []
|
36
|
+
11.times do
|
37
|
+
words << ('0'..'9').to_a.sample
|
38
|
+
end
|
39
|
+
chkdigit = 0
|
40
|
+
words.each do |w|
|
41
|
+
chkdigit += w.to_i
|
42
|
+
end
|
43
|
+
chkdigit = chkdigit.to_i % 10
|
44
|
+
words << chkdigit
|
45
|
+
return words.join
|
46
|
+
end
|
47
|
+
|
33
48
|
# 全角日本語の文字列を取得する。
|
34
49
|
# 漢字は第一水準となる。
|
35
50
|
# @param [Integer] length 文字列長
|
@@ -204,6 +219,7 @@ module Randwordjp
|
|
204
219
|
end
|
205
220
|
return @zip_data
|
206
221
|
end
|
222
|
+
|
207
223
|
# 日本の住所(都道府県、市区町村、字町名)を取得します
|
208
224
|
# @param [Hash] opts オプション設定
|
209
225
|
# @option opts [Boolean] :hyphen true 郵便番号をハイフンありで出力 false 郵便番号をハイフン無しで出力
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: randwordjp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- inpwjp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sequel
|