Class: Lutaml::Lml::Document
- Inherits:
-
Model::Serializable
- Object
- Model::Serializable
- Lutaml::Lml::Document
- Defined in:
- lib/lutaml/lml/models/document.rb
Instance Method Summary collapse
-
#all_classes ⇒ Object
All class-like entities on the document.
-
#classifiable_classes ⇒ Object
Class-like entities that can own associations.
Instance Method Details
#all_classes ⇒ Object
All class-like entities on the document. Used by resolvers and formatters that need to walk every classifiable type without caring which collection holds it.
35 36 37 |
# File 'lib/lutaml/lml/models/document.rb', line 35 def all_classes EntityTypes.all.flat_map { |type| public_send(type.entity_type) } end |
#classifiable_classes ⇒ Object
Class-like entities that can own associations. Excludes enums (which have no attributes/associations of their own).
41 42 43 |
# File 'lib/lutaml/lml/models/document.rb', line 41 def classifiable_classes EntityTypes.classifiable.flat_map { |type| public_send(type.entity_type) } end |