Class: ROM::InlineCreateContainer Private

Inherits:
CreateContainer show all
Defined in:
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 Attribute Summary

Attributes inherited from CreateContainer

#container

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.



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

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