Module: Foobara::TypeDeclarations::LazyElementTypes::Model

Defined in:
foobara-0.2.2/projects/model/src/extensions/type_declarations/lazy_element_types/model.rb

Class Method Summary collapse

Class Method Details

.resolve(type) ⇒ Object



7
8
9
10
11
12
13
14
15
16
# File 'foobara-0.2.2/projects/model/src/extensions/type_declarations/lazy_element_types/model.rb', line 7

def resolve(type)
  Namespace.use type.created_in_namespace do
    attributes_type_declaration = type.declaration_data[:attributes_declaration]

    type.element_types = TypeDeclarations.strict do
      handler = Domain.current.foobara_type_builder.handler_for_class(Handlers::ExtendAttributesTypeDeclaration)
      handler.process_value!(TypeDeclaration.new(attributes_type_declaration))
    end
  end
end