lib/cfndsl/JSONable.rb in cfndsl-0.0.9 vs lib/cfndsl/JSONable.rb in cfndsl-0.0.10
- old
+ new
@@ -66,10 +66,10 @@
#
array = [];
if(arguments.length == 0 ||
(arguments.length == 1 && arguments[0].instance_of?(Hash)) ) then
hash = arguments[0] || {}
- string.scan( /(.*?)(%(%|\{(\w+)\})|\z)/m ) do |x,y|
+ string.scan( /(.*?)(%(%|\{([\w:]+)\})|\z)/m ) do |x,y|
array.push $1 if $1 && $1 != ""
if( $3 == '%' ) then
array.push '%'
elsif( $3 ) then
array.push hash[ $4 ] || hash[ $4.to_sym ] || Ref( $4 )