Module: Kumi::RegistryV2

Defined in:
lib/kumi/registry_v2.rb,
lib/kumi/registry_v2/loader.rb

Defined Under Namespace

Modules: Loader Classes: Function, Instance, Kernel

Constant Summary collapse

DEFAULT_FUNCTIONS_DIR =
File.expand_path("../../data/functions", __dir__)
DEFAULT_KERNELS_DIR =
File.expand_path("../../data/kernels", __dir__)
SELECT_ID =
"__select__"

Class Method Summary collapse

Class Method Details

.load(functions_dir: DEFAULT_FUNCTIONS_DIR, kernels_root: DEFAULT_KERNELS_DIR) ⇒ Object



128
129
130
131
132
133
# File 'lib/kumi/registry_v2.rb', line 128

def load(functions_dir: DEFAULT_FUNCTIONS_DIR, kernels_root: DEFAULT_KERNELS_DIR)
  # Pass the new struct to the loader.
  fn_map = Loader.load_functions(functions_dir, Function)
  kn_map = Loader.load_kernels(kernels_root, Kernel)
  Instance.new(fn_map, kn_map)
end