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