Class: ROM::InlineCreateContainer Private

Inherits:
CreateContainer show all
Defined in:
core/lib/rom/create_container.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Constructor Details

#initialize(*args, &block) ⇒ InlineCreateContainer

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of InlineCreateContainer.



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'core/lib/rom/create_container.rb', line 47

def initialize(*args, &block)
  case args.first
  when Configuration
    environment = args.first.environment
    setup = args.first.setup
  when Environment
    environment = args.first
    setup = args[1]
  else
    configuration = Configuration.new(*args, &block)
    environment = configuration.environment
    setup = configuration.setup
  end

  super(environment, setup)
end