lib/yaks/runner.rb in yaks-0.9.0 vs lib/yaks/runner.rb in yaks-0.10.0
- old
+ new
@@ -12,13 +12,17 @@
def call
Pipeline.new(steps).insert_hooks(hooks).call(object, env)
end
def read
- Pipeline.new([[:parse, serializer.inverse], [:format, formatter.inverse]]).insert_hooks(hooks).call(object, env)
+ Pipeline.new([[:parse, serializer.inverse], [:read, formatter.inverse]]).insert_hooks(hooks).call(object, env)
end
+ def format
+ Pipeline.new([[:format, formatter], [:primitivize, primitivizer]]).insert_hooks(hooks).call(object, env)
+ end
+
def map
Pipeline.new([[:map, mapper]]).insert_hooks(hooks).call(object, env)
end
def context
@@ -80,8 +84,7 @@
memoize :serializer, freezer: :noop
def hooks
config.hooks + options.fetch(:hooks, [])
end
-
end
end