# File lib/uri_template/colon.rb, line 148 def self.try_convert(x) if x.kind_of? String return new(x) elsif x.kind_of? self return x elsif x.kind_of? URITemplate::RFC6570 and x.level == 1 return new( x.pattern.gsub(/\{(.*?)\}/u){ "{:#{$1}}" } ) else return nil end end