-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkoans_0.rb
98 lines (86 loc) · 1.53 KB
/
koans_0.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
class Begin
def initializer()
end
def welcome
text_0 = "welcome to Fluvip".center(80," ")
puts text_0
File.foreach('welecome.txt') do |line|
print line
end
end
def clear_scroll
puts " "*399
end
def menu
File.foreach('menu.txt') do |line|
print line
gets.strip
end
end
def install_curl
File.foreach('install_curl.txt') do |line|
print line
gets.strip
end
end
def install_rvm
File.foreach('install_rvm.txt') do |line|
print line
gets.strip
end
end
def install_tmate
File.foreach('install_tmate.txt') do |line|
print line
gets.strip
end
end
def install_postgres
File.foreach('install_postgresql.txt') do |line|
print line
gets.strip
end
end
def install_Mongo
end
def install_git
File.foreach('install_git.txt') do |line|
print line
gets.strip
end
end
def options
options = gets.chomp()
options = options
case options
when "1"
install_curl
when "2"
install_rvm
when "3"
install_tmate
when "4"
install_rails
when "5"
install_postgres
when "6"
install_Mongo
when "7"
install_git
else
return 10
end
end
def loop_menu
loop do
clear_scroll
menu
a = options
break if a == 10
end
end
end
welcome = Begin.new()
welcome.welcome
gets()
welcome.loop_menu