Sha256: 284d1591d094ce38bcd620ad9957154a2a51eb0d4be8a230893012a972196bd2

Contents?: true

Size: 885 Bytes

Versions: 27

Compression:

Stored size: 885 Bytes

Contents

module Foobara
  module TypeDeclarations
    module Handlers
      class ExtendRegisteredModelTypeDeclaration < ExtendRegisteredTypeDeclaration
        class ToTypeTransformer < ExtendRegisteredTypeDeclaration::ToTypeTransformer
          # TODO: make declaration validator for model_class and model_base_class
          def target_classes(strict_type_declaration)
            declaration_to_type(strict_type_declaration).target_classes
          end

          # TODO: must explode if name missing...
          def type_name(strict_type_declaration)
            declaration_to_type(strict_type_declaration).name
          end

          def declaration_to_type(strict_type_declaration)
            type_for_declaration(strict_type_declaration[:type])
          end

          def non_processor_keys
            [:mutable, *super]
          end
        end
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
foobara-0.0.7 projects/model/src/extensions/type_declarations/handlers/extend_registered_model_type_declaration/to_type_transformer.rb
foobara-0.0.6 projects/model/src/extensions/type_declarations/handlers/extend_registered_model_type_declaration/to_type_transformer.rb
foobara-0.0.5 projects/model/src/extensions/type_declarations/handlers/extend_registered_model_type_declaration/to_type_transformer.rb
foobara-0.0.4 projects/model/src/extensions/type_declarations/handlers/extend_registered_model_type_declaration/to_type_transformer.rb
foobara-0.0.3 projects/model/src/extensions/type_declarations/handlers/extend_registered_model_type_declaration/to_type_transformer.rb
foobara-0.0.2 projects/model/src/extensions/type_declarations/handlers/extend_registered_model_type_declaration/to_type_transformer.rb
foobara-0.0.1 projects/model/src/extensions/type_declarations/handlers/extend_registered_model_type_declaration/to_type_transformer.rb