lib/jschematic/element.rb in jschematic-0.0.9 vs lib/jschematic/element.rb in jschematic-0.1.0

- old
+ new

@@ -12,18 +12,22 @@ def title nil end def id - if @parent + if @parent.respond_to?(:id) @parent.id + @id else @id end end def to_s self.class.to_s + end + + def schema_for(ref) + parent && parent.schema_for(ref) end private def fail_validation!(expected, actual)