Ruby基礎編 備忘録その9
シンボル
- "" や ''を「:」で書くことができる
puts :orange #結果 orange #puts "orange"と一緒 words = { :apple => :りんご, :book => :本, } puts words[:apple] #結果 りんご
puts :orange #結果 orange #puts "orange"と一緒 words = { :apple => :りんご, :book => :本, } puts words[:apple] #結果 りんご