lib/yaks-html.rb in yaks-html-0.6.2 vs lib/yaks-html.rb in yaks-html-0.7.0
- old
+ new
@@ -1,5 +1,8 @@
require 'hexp'
require 'yaks'
require 'yaks/format/html'
-Yaks::Serializer.register(:html, Hexp::Unparser.new({}))
+-> do
+ unparser = Hexp::Unparser.new({})
+ Yaks::Serializer.register(:html, ->(data, env) { unparser.call(data) })
+end.call