#!/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