lib/data_model/scanner.rb in data_model-0.3.0 vs lib/data_model/scanner.rb in data_model-0.4.0
- old
+ new
@@ -30,11 +30,11 @@
prop :params, T::Array[Object], default: []
end
# Scan a schema, which is defined as a data structure, into a struct that is easier to work with.
# "Syntax" validations will be enforced at this level.
- sig { params(schema: TSchema, registry: DataModel::TypeRegistry).returns(Node) }
- def scan(schema, registry = TypeRegistry.instance)
+ sig { params(schema: TSchema, registry: DataModel::Registry).returns(Node) }
+ def scan(schema, registry = Registry.instance)
# state:
# nil (start) -> :type (we have a type) -> :args (we have arguments)
scanned = Node.new
state = T.let(nil, T.nilable(Symbol))