Sha256: efe641047918511608f43e56bef4b5a2e53a71c3c70f5ea2cc418c47851a3d4b

Contents?: true

Size: 806 Bytes

Versions: 9

Compression:

Stored size: 806 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
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
foobara-0.0.47 projects/model/src/extensions/type_declarations/handlers/extend_registered_model_type_declaration/to_type_transformer.rb
foobara-0.0.46 projects/model/src/extensions/type_declarations/handlers/extend_registered_model_type_declaration/to_type_transformer.rb
foobara-0.0.45 projects/model/src/extensions/type_declarations/handlers/extend_registered_model_type_declaration/to_type_transformer.rb
foobara-0.0.44 projects/model/src/extensions/type_declarations/handlers/extend_registered_model_type_declaration/to_type_transformer.rb
foobara-0.0.43 projects/model/src/extensions/type_declarations/handlers/extend_registered_model_type_declaration/to_type_transformer.rb
foobara-0.0.42 projects/model/src/extensions/type_declarations/handlers/extend_registered_model_type_declaration/to_type_transformer.rb
foobara-0.0.41 projects/model/src/extensions/type_declarations/handlers/extend_registered_model_type_declaration/to_type_transformer.rb
foobara-0.0.40 projects/model/src/extensions/type_declarations/handlers/extend_registered_model_type_declaration/to_type_transformer.rb
foobara-0.0.39 projects/model/src/extensions/type_declarations/handlers/extend_registered_model_type_declaration/to_type_transformer.rb