Class: FlatKit::FieldType::GuessType

Inherits:
FlatKit::FieldType show all
Defined in:
lib/flat_kit/field_type/guess_type.rb

Overview

Internal: GuessType is a field type where we don’t know what type the field is, and it needs to be guessed. This is a sentinel type that doesn’t match any data.

Constant Summary

Constants inherited from FlatKit::FieldType

CoerceFailure

Class Method Summary collapse

Methods inherited from FlatKit::FieldType

best_guess, candidate_types, weight, weights

Methods included from DescendantTracker

#children, #find_child, #find_children, #inherited

Class Method Details

.coerceObject



18
19
20
# File 'lib/flat_kit/field_type/guess_type.rb', line 18

def self.coerce(*)
  CoerceFailure
end

.matches?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/flat_kit/field_type/guess_type.rb', line 14

def self.matches?(*)
  false
end

.type_nameObject



10
11
12
# File 'lib/flat_kit/field_type/guess_type.rb', line 10

def self.type_name
  name
end