Module: Lucid::Factory

Included in:
CLI::Context, ContextLoader::Orchestrator
Defined in:
lib/lucid/factory.rb

Instance Method Summary collapse

Instance Method Details

#create_object_of(type) ⇒ Object

Parameters:

  • type (String)

    Object representation



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/lucid/factory.rb', line 4

def create_object_of(type)
  require path_for_type(type)

  names = parse_type(type)
  constant = ::Object

  names.each do |name|
    constant = provide_object_name(constant, name)
  end

  constant
end