The inspect() is an inbuilt method in Ruby that returns a string with the value of the particular struct.
Parameters: The function does not accepts any parameter.
Return Value: It returns the value of struct.
struct name="labrador", speciality="bark", found_in="Newfoundland"
struct name="golden retriever"
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.