lib/yaks/format.rb in yaks-0.8.1 vs lib/yaks/format.rb in yaks-0.8.2

- old
+ new

@@ -6,10 +6,12 @@ # @!attribute [r] options # @return [Hash] attr_reader :options + attr_reader :env + def_delegators :resource, :links, :attributes, :subresources protected :links, :attributes, :subresources, :options # @param [Hash] options @@ -18,10 +20,11 @@ @options = options end # @param [Yaks::Resource] resource # @return [Hash] - def call(resource, _env = {}) + def call(resource, env = {}) + @env = env serialize_resource(resource) end alias serialize call class << self