Struct

来源:互联网 发布:绅士文学app没有网络 编辑:程序博客网 时间:2024/05/16 02:04
require "PP"
Person = Struct.new(:name, :ethnic)
people = Person.new("Dominic", "Asian")
PP::pp people #<struct Person name="Dominic", ethnic="Asian">