Method: Struct#size

Defined in:
struct.c

#lengthFixnum #sizeFixnum

Returns the number of instance variables.

Customer = Struct.new(:name, :address, :zip)
joe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345)
joe.length   #=> 3

Overloads:



863
864
865
# File 'struct.c', line 863

static VALUE
rb_struct_size(s)
VALUE s;