Sha256: c3512baad6ca21673f979eeb1738b51c09e64e3fe1a47678802254bdfff80a0a

Contents?: true

Size: 564 Bytes

Versions: 8

Compression:

Stored size: 564 Bytes

Contents

module Foobara
  module TypeDeclarations
    module Handlers
      class ExtendDetachedEntityTypeDeclaration < ExtendModelTypeDeclaration
        class PrimaryKeyDesugarizer < Desugarizer
          def applicable?(sugary_type_declaration)
            primary_key = sugary_type_declaration[:primary_key]

            primary_key.is_a?(::String)
          end

          def desugarize(sugary_type_declaration)
            sugary_type_declaration.merge(primary_key: sugary_type_declaration[:primary_key].to_sym)
          end
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
foobara-0.0.38 projects/detached_entity/src/extensions/type_declarations/handlers/extend_detached_entity_type_declaration/primary_key_desugarizer.rb
foobara-0.0.37 projects/detached_entity/src/extensions/type_declarations/handlers/extend_detached_entity_type_declaration/primary_key_desugarizer.rb
foobara-0.0.36 projects/detached_entity/src/extensions/type_declarations/handlers/extend_detached_entity_type_declaration/primary_key_desugarizer.rb
foobara-0.0.35 projects/detached_entity/src/extensions/type_declarations/handlers/extend_detached_entity_type_declaration/primary_key_desugarizer.rb
foobara-0.0.34 projects/detached_entity/src/extensions/type_declarations/handlers/extend_detached_entity_type_declaration/primary_key_desugarizer.rb
foobara-0.0.33 projects/detached_entity/src/extensions/type_declarations/handlers/extend_detached_entity_type_declaration/primary_key_desugarizer.rb
foobara-0.0.32 projects/detached_entity/src/extensions/type_declarations/handlers/extend_detached_entity_type_declaration/primary_key_desugarizer.rb
foobara-0.0.31 projects/detached_entity/src/extensions/type_declarations/handlers/extend_detached_entity_type_declaration/primary_key_desugarizer.rb