lib/string.rb in foreplay-0.9.1 vs lib/string.rb in foreplay-0.9.2
- old
+ new
@@ -12,6 +12,10 @@
end
def ansi_attributes(*args)
"\e[#{args.join(';')}m#{self}\e[0m"
end
+
+ def fake_erb
+ gsub(/(<%=\s+([^%]+)\s+%>)/) { |e| eval "_ = #{e.split[1]}" }
+ end
end