module DbSchema::Definitions::Field
Public Class Methods
build(name, type, **options)
click to toggle source
# File lib/db_schema/definitions/field.rb, line 5 def build(name, type, **options) type_class_for(type).new(name, **options) end
registry()
click to toggle source
# File lib/db_schema/definitions/field.rb, line 15 def registry @registry ||= {} end
type_class_for(type)
click to toggle source
# File lib/db_schema/definitions/field.rb, line 9 def type_class_for(type) registry.fetch(type) do |type| Custom.class_for(type) end end