Skip to content

ksss/mruby-singleton

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

mruby-singleton

Singleton module in mruby.

class Example
  include Singleton
  attr_accessor :keep
end

a = Example.instance
b = Example.instance
a.keep = "keep this"
p b.keep #=> "keep this"
a.keep = nil
p b.keep #=> nil

Installation

use github repository

Write in /mruby/build_config.rb

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

or use mgem

mgem add mruby-singleton

build

and exec in your /mruby.

rake clean
rake
rake test

License

MIT

About

Singleton module in mruby based on

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages