Class: Nocode::StepRegistry

Inherits:
Util::ClassRegistry show all
Extended by:
Forwardable
Includes:
Singleton
Defined in:
lib/nocode/step_registry.rb

Overview

Provides a global place to register all valid steps by their types. By default the steps directory will be autoloaded and their paths will be used as their types. For example: for the class: steps/io/write, it would register as “io/write” type.

Constant Summary collapse

CLASS_PREFIX =
'Nocode::Steps::'
DIR =
File.join(__dir__, 'steps')

Instance Attribute Summary

Attributes inherited from Util::ClassRegistry

#types_to_classes

Instance Method Summary collapse

Methods inherited from Util::ClassRegistry

#constant!, #initialize, #load, #register, #unregister

Constructor Details

This class inherits a constructor from Nocode::Util::ClassRegistry

Instance Method Details

#load!Object



26
27
28
29
30
31
# File 'lib/nocode/step_registry.rb', line 26

def load!
  files_loaded = Util::ClassLoader.new(DIR).load!

  # Class the parent to load up the registry with the files we found.
  load(files_loaded, class_prefix: CLASS_PREFIX)
end