class Field::Base

Attributes

name[RW]
translated[RW]
type[RW]

Public Class Methods

fetch(type) click to toggle source
# File lib/field/base.rb, line 6
def self.fetch(type)
  raise ::ArgumentError, "Unsupported type #{type}" unless supported_types.include?(type.to_sym)

  "Field::Types::#{type.classify}".constantize.new
end
supported_types() click to toggle source
# File lib/field/base.rb, line 20
def self.supported_types
  []
end

Public Instance Methods

json_schema_format() click to toggle source
# File lib/field/base.rb, line 12
def json_schema_format
  ''
end
json_schema_pattern() click to toggle source
# File lib/field/base.rb, line 24
def json_schema_pattern
  ''
end
json_schema_type() click to toggle source
# File lib/field/base.rb, line 16
def json_schema_type
  :string
end