$:.unshift '../lib' $:.unshift './lib' require 'dynaload' module M CONSTANT = 4 module N ANOTHER_CONSTANT = 2 end class A def run 4 end class B def run 2 end end end end Dynaload::export M, 'description' => 'the M module', 'type' => 'module' Dynaload::export M::N, 'description' => 'the M::N module', 'type' => 'module' Dynaload::export M::A, 'description' => 'the M::A class', 'type' => 'class', 'runnable' => true Dynaload::export M::A::B, 'description' => 'the M::A::B class', 'type' => 'class', 'runnable' => true, 'these can be' => 'any attributes you like!'