tobopomo 1.1.0 → 1.2.0

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: e0ee5e826f9a583e6d0534654a32c25068d95c8a
4
- data.tar.gz: d9418b641b9677648a7b14df2563db7a77111232
3
+ metadata.gz: 0fd41bf0429fe4ab8803ca00edbcb32d8ca9bd85
4
+ data.tar.gz: e37bcc643d9085e5d4cdc634656d5558d668e0c6
5
5
  SHA512:
6
- metadata.gz: f179e23db01c3048cdd5efed434f302e71675fe67afa436f277b3a2a9177359a60623a3d689fba0ad500fa5442daa579e0cefcd9b4a939b75af4ecd9557fb1ef
7
- data.tar.gz: 40e6c61231aac98fc8a7d0dff5ff5bbd7dd44317673406c74af41986dabc1ce1847856588eb8372acca145320c409beaf8fe9415db134152c843f4a9ba3640ec
6
+ metadata.gz: 4a9cf180269dd4884257ce9a7cb449d7f6f3194b3e16217253d1a8fc534415e592be9131ba40cbb281529cd23416c0e83b193f9480907a8202898026c77cd676
7
+ data.tar.gz: b6482241ced0468a87137a7ab218b6fb845e177d7b72cc240a4fb433c41e8792b1a8bfca680c641d30020c2141dcbd14a1ac843401bea143e7913393990683c1
data/lib/tobopomo.rb CHANGED
@@ -8,8 +8,7 @@ module Tobopomo
8
8
  end
9
9
  def tobopomo(input)
10
10
  input = input.chars.map{|x| Tobopomo::LAYOUT[:"#{x.ord.to_s}"]}.join("")
11
- string = input.split(/[" "|"ˇ"|"ˋ"|"ˊ"|"˙"]/)
12
- string = string.map.with_index { |x , index| x + input[string[0..index].inject(0){|sum , i| sum+i.length} + index] } # x + input[ sum_array_length_until_current_index + index]
11
+ string = input.split(/(?<=[" "|"ˇ"|"ˋ"|"ˊ"|"˙"])/)
13
12
  return string.map{|x| normalise(x)}
14
13
  end
15
14
  def tokanji(input, limit=5)
@@ -1,3 +1,3 @@
1
1
  module Tobopomo
2
- VERSION = "1.1.0"
2
+ VERSION = "1.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tobopomo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - dylandy.chang
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-20 00:00:00.000000000 Z
11
+ date: 2016-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler