Module: Twostroke::Runtime::Lib
- Defined in:
- lib/twostroke/runtime/lib.rb
Constant Summary collapse
- INITIALIZERS =
[]
Class Method Summary collapse
Class Method Details
.register(&bk) ⇒ Object
9 10 11 |
# File 'lib/twostroke/runtime/lib.rb', line 9 def self.register(&bk) INITIALIZERS << bk end |
.setup_environment(vm) ⇒ Object
5 6 7 |
# File 'lib/twostroke/runtime/lib.rb', line 5 def self.setup_environment(vm) INITIALIZERS.each { |i| i.arity == 1 ? i.(vm.global_scope) : i.(vm.global_scope, vm) } end |