OpenStruct in Ruby
20-Aug-2020 1991
In Ruby, OpenStruct is a data structure, similar to Hash. With this, we can define attributes with values (key value pairs).OpenStruct is a class which uses ruby’s metaprogramming for its implementation, since its not part of the ruby core, we have to require ostruct library which defines it.
OpenStruct in Ruby #ruby #rubydeveloper #rubyonrails #OpenStruct https://rubyonrails.ba/link/openstruct-in-ruby