Class: Foobara::DetachedEntity

Inherits:
Model
  • Object
show all
Includes:
Concerns::Aliases, Concerns::Associations, Concerns::Equality, Concerns::PrimaryKey, Concerns::Reflection, Concerns::Serialize, Concerns::Types
Defined in:
foobara-0.0.110/projects/detached_entity/src/concerns/types.rb,
foobara-0.0.110/projects/detached_entity/src/detached_entity.rb,
foobara-0.0.110/projects/detached_entity/src/concerns/aliases.rb,
foobara-0.0.110/projects/detached_entity/src/concerns/equality.rb,
foobara-0.0.110/projects/detached_entity/src/concerns/serialize.rb,
foobara-0.0.110/projects/detached_entity/src/concerns/reflection.rb,
foobara-0.0.110/projects/detached_entity/src/concerns/primary_key.rb,
foobara-0.0.110/projects/detached_entity/src/concerns/associations.rb,
foobara-0.0.110/projects/detached_entity/lib/foobara/detached_entity.rb,
foobara-0.0.110/projects/detached_entity/src/sensitive_type_removers/detached_entity.rb,
foobara-0.0.110/projects/detached_entity/src/sensitive_value_removers/detached_entity.rb

Direct Known Subclasses

Entity, Manifest::Entity

Defined Under Namespace

Modules: Concerns, SensitiveTypeRemovers, SensitiveValueRemovers

Instance Attribute Summary

Attributes inherited from Model

#mutable

Class Method Summary collapse

Methods included from Concerns::Serialize

#inspect, #to_json

Methods included from Concern

foobara_class_methods_module_for, foobara_concern?, included

Methods included from Concerns::PrimaryKey

#primary_key

Methods included from Concerns::Equality

#==, #dup, #hash

Methods inherited from Model

#==, abstract, abstract?, attribute_names, #attributes, #attributes_with_delegates, #cast_attribute, #cast_attribute!, closest_namespace_module, description, domain, domain_name, #eql?, foobara_model_name, foobara_name, full_model_name, #hash, #initialize, organization_name, possible_errors, #read_attribute, #read_attribute!, subclass, #to_h, #to_json, #valid?, valid_attribute_name?, #validate!, validate_attribute_name!, #validation_errors, #write_attribute, #write_attribute!, #write_attributes, #write_attributes!

Constructor Details

This class inherits a constructor from Foobara::Model

Class Method Details

.install!Object

Need to override this otherwise we install Model twice



7
8
9
10
11
12
13
14
15
16
# File 'foobara-0.0.110/projects/detached_entity/lib/foobara/detached_entity.rb', line 7

def install!
  handler = TypeDeclarations::Handlers::ExtendDetachedEntityTypeDeclaration.new
  TypeDeclarations.register_type_declaration(handler)

  TypeDeclarations.register_sensitive_type_remover(SensitiveTypeRemovers::DetachedEntity.new(handler))
  TypeDeclarations.register_sensitive_value_remover(handler, SensitiveValueRemovers::DetachedEntity)

  model = Namespace.global.foobara_lookup_type!(:model)
  BuiltinTypes.build_and_register!(:detached_entity, model, nil)
end

.reset_allObject



18
19
20
# File 'foobara-0.0.110/projects/detached_entity/lib/foobara/detached_entity.rb', line 18

def reset_all
  install!
end