kaki-utils 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/kaki/utils.rb +2 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 72bacd04bc1372b116ebe8ace9f7f0a32fdcf935c689cf29ed853f0c0e5561f0
4
- data.tar.gz: 34cb58e25174a33c63831bf2757eb16db2633fde79d0b123ae063ebbae0598eb
3
+ metadata.gz: 688a8c032dc772a0a910b8f6c3192e11ba2eafba007552787e7176646dfaef47
4
+ data.tar.gz: 3329d75a745d4eb14378d6fb37e6f968215d011b5785ae05495e9a974201933f
5
5
  SHA512:
6
- metadata.gz: 7bc4cbb3ad13c05971dd09aa0d10bb2a5f538c8128bc016ee4b6f0736f926cc8da4b6ee8c56f0e7ebeed8b78634a6b982f0be792d26e7c264214d51fe8c01056
7
- data.tar.gz: e2fedbbb7b6078f96e912a26a9dae50f36c22b756940c530cf6398de2b10e3fa516051638dd29660338f7b2f6a21200524f75d103d27882f73c8a8802b9b5bdc
6
+ metadata.gz: 6e7c8f653ba05b75c2b5e56a8a11d7dafc8357a31a0b720d53ad64d118f3cf9ba525c597c995e8b3a23b107990cb26c821d5215d0dcbe37cbf2b3d9657b94600
7
+ data.tar.gz: e94ff9bd42afa55548d574a7e550a14992858f94a145e0e8d9067ed1616b13b211a5cd4353fa15075aafeec826b7dbcccf5ff7ed02b62f17cf70e84dacffdca2
data/lib/kaki/utils.rb CHANGED
@@ -35,10 +35,11 @@ module Utils
35
35
 
36
36
  #一文字入力
37
37
  # @return [String]
38
- def key_wait
38
+ def key_wait(breakable = true)
39
39
  c = nil
40
40
  loop {break if (c = STDIN.getch)}
41
41
  STDIN.cooked!
42
+ raise Interrupt if breakable and c == "\cC"
42
43
  c
43
44
  end
44
45
  module_function :key_wait
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kaki-utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - obelisk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-10 00:00:00.000000000 Z
11
+ date: 2018-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gtk2