law_number_switch 0.0.2 → 0.0.3
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/law_number_switch.rb +4 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b307fedb81fbfc3b15373e3f891c833ec4b8028a
|
4
|
+
data.tar.gz: ce17a87b622c5bd6758a73c916656db073dac670
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4cbc5e184ebbba72b7baaa245500927a66d72e760fcbc76175994c06e746a021403ac1eaf12e120421bfb51d2faec52f7dc4168bad0d7630a2f5bde9fd384dd
|
7
|
+
data.tar.gz: f02a1c066562379d75085be4d9096fdc497b467f8e91f220d09470d73c5134e02b0fb77b0c7641b7b4ba03ab398116d468bdab989ae5614fff52e11867d76cf4
|
data/lib/law_number_switch.rb
CHANGED
@@ -143,13 +143,14 @@ module LawNumberSwitch
|
|
143
143
|
w_arr = []
|
144
144
|
front = self.scan(/[^之]*之/)
|
145
145
|
behind = self.scan(/[^之]*.$/)[0]
|
146
|
-
|
146
|
+
|
147
147
|
front.each do |f|
|
148
|
+
f = f.chop
|
148
149
|
f_w = f.int_number + '-'
|
149
150
|
w_arr << f_w
|
150
151
|
end
|
151
|
-
|
152
|
-
behind.
|
152
|
+
|
153
|
+
behind = behind.reverse.chop.reverse
|
153
154
|
b_w = behind.int_number
|
154
155
|
w_arr << b_w
|
155
156
|
w_arr.join
|