-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.rb
39 lines (27 loc) · 837 Bytes
/
index.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
require 'colorize'
require 'tty-prompt'
require_relative 'src/general-calculations'
require_relative 'src/sound-level'
require_relative 'src/reverb-time'
def self.intro()
system("clear")
include General
include SoundLevel
include ReverbTime
prompt = TTY::Prompt.new
puts "\nHello! Welcome to this simple acoustics calculator.".colorize(:light_yellow)
options = ["General Calculations", "Sound Level", "Reverberation Time (RT)", "Exit"]
input = prompt.select("\nWhat would you like to calculate?\n", options)
case input
when "General Calculations"
General.general_calculations()
when "Sound Level"
SoundLevel.level_calculations()
when "Reverberation Time (RT)"
ReverbTime.reverb_calculations()
when "Exit"
puts "\nSee you later!".colorize(:light_yellow)
exit!
end
end
intro()