p(...) public

For each object, directly writes obj.inspect followed by the current output record separator to the program’s standard output.

S = Struct.new(:name, :state)
s = S['dave', 'TX']
p s

produces:

#<S name="dave", state="TX">
Show source
Register or log in to add new notes.