pokeberu 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/pokeberu/runner.rb +20 -5
- data/lib/pokeberu/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8d06a95772f7b43d270fd67c4adc97ed7ed7ee263435829ff868e6aade7a722
|
4
|
+
data.tar.gz: d4be4bf788693e9d77c9e04dc8682ddbf9769425723232ae4b9b6f413f0c2a15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48412989c9d7ddc90cebeda3e9b07e8fba0b6bbeeafa721938e9ae8c75ee123b9baa6b0357aac96a63578cf415a4df82f44ed77d6cbd280db5032b9849acb3be
|
7
|
+
data.tar.gz: 452d3b44f0fdc419a8ba08a66aabadfa4301c26535969b8150e92d629e671e30c5c97575969e14aa4a101559d4b2724ef2cfee0a2942967a6e6dfd606c00714d
|
data/Gemfile.lock
CHANGED
data/lib/pokeberu/runner.rb
CHANGED
@@ -1,19 +1,34 @@
|
|
1
1
|
module Pokeberu
|
2
2
|
class Runner
|
3
|
+
BYE = '17501068'
|
4
|
+
|
3
5
|
def self.run
|
4
|
-
|
5
|
-
|
6
|
+
self.new.run
|
7
|
+
end
|
8
|
+
|
9
|
+
def initialize
|
10
|
+
@converter = Pokeberu::Converter.new
|
11
|
+
@decorator = Pokeberu::Decorator.new
|
12
|
+
end
|
13
|
+
|
14
|
+
def run
|
6
15
|
loop do
|
7
16
|
print 'メッセージを入力してください (exitで終了): '
|
8
17
|
input = gets.chomp
|
9
18
|
if input == 'exit'
|
10
19
|
break
|
11
20
|
else
|
12
|
-
|
13
|
-
puts decorator.decorate(chars), "\n"
|
21
|
+
show_pokberu(input)
|
14
22
|
end
|
15
23
|
end
|
16
|
-
|
24
|
+
show_pokberu(BYE)
|
25
|
+
end
|
26
|
+
|
27
|
+
private
|
28
|
+
|
29
|
+
def show_pokberu(input)
|
30
|
+
chars = @converter.to_chars(input)
|
31
|
+
puts @decorator.decorate(chars), "\n"
|
17
32
|
end
|
18
33
|
end
|
19
34
|
end
|
data/lib/pokeberu/version.rb
CHANGED