Module: Foobara::Model::Concerns::Reflection::ClassMethods

Defined in:
foobara-0.0.125/projects/model/src/concerns/reflection.rb

Instance Method Summary collapse

Instance Method Details

#foobara_manifestObject

[View source]

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'foobara-0.0.125/projects/model/src/concerns/reflection.rb', line 8

def foobara_manifest
  remove_sensitive = TypeDeclarations.foobara_manifest_context_remove_sensitive?

  attributes_declaration = foobara_attributes_type.declaration_data

  if remove_sensitive
    attributes_declaration = TypeDeclarations.remove_sensitive_types(attributes_declaration)
  end

  # TODO: do we really need all this stuff? Can't it be grabbed off of the declaration data to save
  # space?
  Util.remove_blank(
    attributes_type: attributes_declaration,
    organization_name: foobara_type.foobara_domain.foobara_organization_name,
    domain_name: foobara_type.foobara_domain.foobara_domain_name,
    model_name: foobara_model_name,
    model_base_class: foobara_type.declaration_data[:model_base_class],
    model_class: foobara_type.declaration_data[:model_class],
    delegates:,
    private: private_attribute_names
  )
end