We should ensure that the middleware always return a hash.
we could raise an error if the middleware returns something different than a hash.
example:
class Mapper < HashMap::Base
transforms_output ->(o) { o.compact }, ->(o){ logger.info(o.inspect) }
property :name
end
That will return true instead of a hash.
We should ensure that the middleware always return a hash.
we could raise an error if the middleware returns something different than a hash.
example:
That will return true instead of a hash.