Skip to content

Tag Archives: Ruby Struct-class

The inspect() is an inbuilt method in Ruby that returns a string with the value of the particular struct. Syntax: struct_name.inspect() Parameters: The function does… Read More
The == is an inbuilt method in Ruby returns true if other has the same struct subclass and has equal member values. Syntax: struct1 ==… Read More
The each() is an inbuilt method in Ruby returns every value of the struct in the existing order. In case no block is passed, it… Read More
The filter() is an inbuilt method in Ruby that returns an array which contains the member value from struct which returns a true value for… Read More
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… Read More
The values() is an inbuilt method in Ruby that returns an array with the value of the particular struct. Syntax: struct_name.to_a[integer] Parameters: The function accepts… Read More
The to_s() is an inbuilt method in Ruby that returns a string with the value of the particular struct. Syntax: struct_name.to_s() Parameters: The function does… Read More
The eql?() is an inbuilt method in Ruby returns true if other has the same struct subclass and has equal member values. Syntax: struct1.eql?(struct2) Parameters:… Read More
The values_at() is an inbuilt method in Ruby that returns an array with the struct members values. Selector can be of two types: Integer or… Read More
The to_a() is an inbuilt method in Ruby that returns an array with the value of the particular struct. Syntax: struct_name.to_a[integer] Parameters: The function accepts… Read More
The size() is an inbuilt method in Ruby that returns the total number of members present in struct. Syntax: struct_name.size() Parameters: The function does not… Read More
The members() is an inbuilt method in Ruby that returns an array of symbols containing the struct members. Syntax: struct_name.members() Parameters: The function does not… Read More