OpenStruct binding in mruby.
o = OpenStruct.new
o.foo = 1
o.bar = "baz"
p o.foo #=> 1
p o.to_h #=> {:foo => 1, :bar => "baz"}
Write in /mruby/build_config.rb
MRuby::Build.new do |conf|
conf.gem :github => 'ksss/mruby-ostruct', :branch => 'master'
end
mgem add mruby-ostruct
and exec in your /mruby.
rake clean
rake
rake test
MIT