lib/jimmy/definitions.rb in jimmy-0.3 vs lib/jimmy/definitions.rb in jimmy-0.3.1
- old
+ new
@@ -16,8 +16,12 @@
def compile
map { |k, v| [k.to_s, v.compile] }.to_h
end
+ def [](key)
+ super || (schema.parent && schema.parent.definitions[key])
+ end
+
SchemaCreation.apply_to(self) { |schema, name| self[name] = schema }
end
end