Class: TypedData::Schema::StringType

Inherits:
Type
  • Object
show all
Defined in:
lib/typed_data/schema/string_type.rb

Constant Summary collapse

SUPPORTED_LOGICAL_TYPES =
%w[uuid]

Instance Method Summary collapse

Methods inherited from Type

#accept, #initialize, #to_s

Constructor Details

This class inherits a constructor from TypedData::Schema::Type

Instance Method Details

#match?(value) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/typed_data/schema/string_type.rb', line 12

def match?(value)
  value.is_a?(String)
end

#primitive?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/typed_data/schema/string_type.rb', line 8

def primitive?
  true
end