Class: Hyrax::SimpleSchemaLoader::AttributeDefinition::Identity Private

Inherits:
Object
  • Object
show all
Defined in:
app/services/hyrax/simple_schema_loader.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

This class acts as a Valkyrie/Dry::Types collection with typed members, but instead of wrapping the given type with itself as the collection type (as in ‘Valkyrie::Types::Array.of(MyType)`), it returns the given type.

Examples:

Identity.of(Valkyrie::Types::String) # => Valkyrie::Types::String

Class Method Summary collapse

Class Method Details

.of(type) ⇒ Dry::Types::Type

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns the type passed in.

Parameters:

  • (Dry::Types::Type)

Returns:

  • (Dry::Types::Type)

    the type passed in



107
108
109
# File 'app/services/hyrax/simple_schema_loader.rb', line 107

def self.of(type)
  type
end