MVV90 / mruby-ostruct

OpenStruct in mruby based on

Home Page:https://github.com/ruby/ruby/blob/trunk/lib/ostruct.rb

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mruby-ostruct

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"}

Installation

use github repository

Write in /mruby/build_config.rb

MRuby::Build.new do |conf|
  conf.gem :github => 'ksss/mruby-ostruct', :branch => 'master'
end

or use mgem

mgem add mruby-ostruct

build

and exec in your /mruby.

rake clean
rake
rake test

License

MIT

About

OpenStruct in mruby based on

https://github.com/ruby/ruby/blob/trunk/lib/ostruct.rb

License:MIT License


Languages

Language:Ruby 100.0%