lib/approvals/writers/array_writer.rb in approvals-0.0.12 vs lib/approvals/writers/array_writer.rb in approvals-0.0.13

- old
+ new

@@ -1,13 +1,17 @@ module Approvals module Writers class ArrayWriter < TextWriter def format(data) - data.map.with_index do |value, i| + filter(data).map.with_index do |value, i| "[#{i.inspect}] #{value.inspect}\n" end.join end + def filter data + filter = ::Approvals::Filter.new(Approvals.configuration.excluded_json_keys) + filter.apply(data) + end end end end