Ruby | Struct length() function
The length() is an inbuilt method in Ruby that returns the number of members in struct. Syntax: struct_name.length() Parameters: The function does not accepts any parameter. Return Value: It returns the number of members in the struct. Example 1: Ruby # Ruby program for length method in struct # Inc