class FlatKit::FieldType::StringType
StringType
is essentially a fallback - hence its lower weight than other types that might have string representations.
Public Class Methods
coerce(data)
click to toggle source
# File lib/flat_kit/field_type/string_type.rb, line 15 def self.coerce(data) data.to_s rescue => _ CoerceFailure end
matches?(data)
click to toggle source
# File lib/flat_kit/field_type/string_type.rb, line 11 def self.matches?(data) data.kind_of?(String) end
type_name()
click to toggle source
# File lib/flat_kit/field_type/string_type.rb, line 7 def self.type_name "string" end