Class: Approvals::Writers::ArrayWriter
- Inherits:
-
TextWriter
- Object
- TextWriter
- Approvals::Writers::ArrayWriter
- Defined in:
- lib/approvals/writers/array_writer.rb
Instance Method Summary collapse
Methods inherited from TextWriter
Instance Method Details
#format(data) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/approvals/writers/array_writer.rb', line 5 def format(data) s = "" data.each_with_index do |value, i| s << "[#{i.inspect}] #{value.inspect}\n" end s end |