[Ruby] Database search system 04-08-2015, 04:39 AM
#1
This is more of a concept than a fully-built program but here it is (If you're not in the list, don't be offended.)
Code:
#rDB by Nightc||ed, ©2015
db = Hash.new
######List definitions######
db["Admin "] = "Oni"
db["Gold "] = "Eclipse"
db["S-Mod "] = "Saikou"
db["Dysfunctional();"] = "Nightc||ed"
db["Registered "] = "Anime"
db["Bronze "] = "Master"
db["Err "] = "Error"
############################
x = 0
num = db.count - 1
###########Full list############
puts "Group: Member:"
num.times do |pair|
puts "#{db.keys[x]} │ #{db.values[x]}"
x += 1
end
###############################
puts "-------------------
Enter index number:"
i = gets.to_i
i -= 1
system "cls"
puts "Group: Member:"
puts "#{db.keys[i]} │ #{db.values[i]}"
sleepIt's often the outcasts, the iconoclasts ... those who have the least to lose because they
don't have much in the first place, who feel the new currents and ride them the farthest.
don't have much in the first place, who feel the new currents and ride them the farthest.

















![[+]](https://sinister.li/images/modern/collapse_collapsed.png)