lib/jimmy/transform_keys.rb in jimmy-0.5.0 vs lib/jimmy/transform_keys.rb in jimmy-0.5.1

- old
+ new

@@ -20,12 +20,20 @@ cache(method)[sym] ||= __send__(method, sym.to_s).to_sym else sym end end + + def transform_ref(str, method) + if method + str.sub(/#(.+)/) { '#' << $1.split('/').map { |part| __send__ method, part }.join('/') } + else + str + end + end end def self.transformer @transformer ||= Transformer.new end end -end \ No newline at end of file +end