lib/schema_serializer/definition.rb in schema_serializer-0.2.2 vs lib/schema_serializer/definition.rb in schema_serializer-0.2.3
- old
+ new
@@ -2,10 +2,10 @@
class Definition
attr_reader :schemas
def initialize(hash)
@schemas = hash.each_with_object({}) { |(name, schema), obj|
- obj[name.to_s] = Schema.new(schema)
+ obj[name.to_s] = Schema.new(name, schema)
}
end
def schema(name)
schemas[name] || (raise SchemaNotFound, name)