lib/jsonapionify/api/resource/definitions/response_headers.rb in jsonapionify-0.11.11 vs lib/jsonapionify/api/resource/definitions/response_headers.rb in jsonapionify-0.12.0

- old
+ new

@@ -1,15 +1,16 @@ module JSONAPIonify::Api module Resource::Definitions::ResponseHeaders + using JSONAPIonify::DestructuredProc def self.extended(klass) klass.class_eval do extend JSONAPIonify::InheritedAttributes inherited_hash_attribute :response_header_definitions context(:response_headers, persisted: true) do |context| self.class.response_header_definitions.each_with_object({}) do |(name, block), headers| - headers[name.to_s] = instance_exec(context, &block) + headers[name.to_s] = instance_exec(context, &block.destructure) end end end end