Method: Code#lines_to_s
- Defined in:
- lib/asker/code/code.rb
#lines_to_s(lines) ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/asker/code/code.rb', line 32 def lines_to_s(lines) out = '' lines.each_with_index do |line, index| out << format("%2d| #{line}\n", (index + 1)) end out end |