Newer
Older
Ruby / csv.rb
@ABE Koshun ABE Koshun on 1 Dec 2021 513 bytes 2021-12-01 19:21:10
#!/usr/bin/env ruby
# coding: utf-8

require 'csv'
nin = CSV.read("game.csv", :headerrs => true)
while true
  puts"1 ゲーム紹介"
  puts"0 終了"
  puts"どちらか選んでね!=D"
  ten=gets.to_i
  if ten == 0 then
    break
  elsif ten == 1 then
    d = 0
    nin.each{|rou|
      printf("ゲーム名 => %s \n値段 => %s \n紹介 => %s \n",row["ゲーム名"],row["値段"],row["紹介"])
      print("===========================================o\n") }
  end
end