Class: Industrialist::Builder

Inherits:
Object
  • Object
show all
Defined in:
lib/industrialist/builder.rb

Class Method Summary collapse

Class Method Details

.build(type, key, *args) ⇒ Object



5
6
7
8
# File 'lib/industrialist/builder.rb', line 5

def self.build(type, key, *args)
  klass = Registrar.value_for(type, key)
  Object.const_get(klass.name)&.new(*args) unless klass.nil?
end