lib/nuri/helper.rb in nuri-0.5.2 vs lib/nuri/helper.rb in nuri-0.5.3

- old
+ new

@@ -16,19 +16,26 @@ if value.is_a?(Hash) case value['_context'] when 'null' nil when 'any_value' - '$.Any:' + value['_isa'] + isa = value['_isa'] + if isa.is_a?(String) and isa.isref + '$.Any' + '.' + isa[2, isa.length-2] + else + '$.Any' + end when 'set' value['_values'] else value end elsif value.is_a?(Sfp::Unknown) - '$.Unknown:' + value.type.to_s + t = value.type.to_s + "$.Unknown" + (t.length > 2 ? ".#{t[2, t.length-2]}" : "") elsif value.is_a?(Sfp::Undefined) - '$.Undefined:' + value.type.to_s + t = value.type.to_s + "$.Undefined" + (t.length > 2 ? ".#{t[2, t.length-2]}" : "") else value end end end