Sha256: 9467a64b66b2c182f9c687f4b126d2cd47438e96c5fabfa955aad8cc27f5d48d

Contents?: true

Size: 565 Bytes

Versions: 27

Compression:

Stored size: 565 Bytes

Contents

module Foobara
  module TypeDeclarations
    module Handlers
      class ExtendEntityTypeDeclaration < ExtendModelTypeDeclaration
        class ModelClassDesugarizer < ExtendModelTypeDeclaration::ModelClassDesugarizer
          def expected_type_symbol
            :entity
          end

          def default_model_base_class
            Foobara::Entity
          end

          def create_model_class_args(model_module:, type_declaration:)
            super.merge(primary_key: type_declaration[:primary_key])
          end
        end
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
foobara-0.0.7 projects/entity/src/extensions/type_declarations/handlers/extend_entity_type_declaration/model_class_desugarizer.rb
foobara-0.0.6 projects/entity/src/extensions/type_declarations/handlers/extend_entity_type_declaration/model_class_desugarizer.rb
foobara-0.0.5 projects/entity/src/extensions/type_declarations/handlers/extend_entity_type_declaration/model_class_desugarizer.rb
foobara-0.0.4 projects/entity/src/extensions/type_declarations/handlers/extend_entity_type_declaration/model_class_desugarizer.rb
foobara-0.0.3 projects/entity/src/extensions/type_declarations/handlers/extend_entity_type_declaration/model_class_desugarizer.rb
foobara-0.0.2 projects/entity/src/extensions/type_declarations/handlers/extend_entity_type_declaration/model_class_desugarizer.rb
foobara-0.0.1 projects/entity/src/extensions/type_declarations/handlers/extend_entity_type_declaration/model_class_desugarizer.rb