Method: Mysql2xxxx::JSON#to_file
- Defined in:
- lib/mysql2xxxx/writer/json.rb
#to_file(f) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/mysql2xxxx/writer/json.rb', line 5 def to_file(f) first = true f.write '[' stream_hashes do |hsh| if first first = false else f.write ',' end f.write ::MultiJson.encode(hsh) end f.write ']' nil end |