lib/active_text/variable.rb in active_text-0.0.8 vs lib/active_text/variable.rb in active_text-0.1.0

- old
+ new

@@ -24,11 +24,11 @@ content_of(method_name.to_s) end end def value - @context.each do |string| + @context.split("\n").each do |string| string =~ /^\${1}#{@key}: (.+);/ return $1 if $1 end end @@ -37,10 +37,10 @@ end private def content_of(metadata) - @context.each do |string| + @context.split("\n").each do |string| string =~ /^#{@comment} @([\w]+[^\s]) (.+)/ return $2 if $1 == metadata end end