Class: SnailParser::Formatter::Vim
- Inherits:
-
SnailParser::Formatter
- Object
- SnailParser::Formatter
- SnailParser::Formatter::Vim
- Defined in:
- lib/snail_parser/formatter/vim.rb
Instance Method Summary collapse
Methods inherited from SnailParser::Formatter
Constructor Details
This class inherits a constructor from SnailParser::Formatter
Instance Method Details
#report ⇒ Object
2 3 4 5 6 7 8 9 |
# File 'lib/snail_parser/formatter/vim.rb', line 2 def report rows = @result.each_with_object([]) do |row, result| line = row.map { |key, value| "'#{key}':#{cast_value_to_vim_object(value)}" } result << "{#{line.join(',')}}" end "[#{rows.join(',')}]" end |