DEV Community

Discussion on: Introduction to OpenStruct

Collapse
 
stargator profile image
Stargator

Why is it called OpenStruct? I see implementations of it in Ruby and Python. But I wonder if there is an open source specification to allow it to be defined in other languages?

Collapse
 
cseeman profile image
christine

From my understanding of it pertaining to Ruby, that it is similar to a Struct data structure type, but more open and flexible. So to me the naming works for that definition, OpenStruct. I am not totally sure if it it is open source specification for it. But you can always check out the Ruby source code definition for it, which would get you on your way for programming it in another language. github.com/ruby/ruby/blob/trunk/li...