module Fileconv::JSON
Public Instance Methods
post_convert_file(obj, acc)
click to toggle source
# File lib/fileconv/json.rb, line 17 def post_convert_file(obj, acc) return unless obj if @opts[:pretty_json] ::JSON.pretty_generate(obj, @opts[:write_json_opts]) else ::JSON.generate(obj, @opts[:write_json_opts]) end end
pre_convert_file(data, acc)
click to toggle source
# File lib/fileconv/json.rb, line 13 def pre_convert_file(data, acc) ::JSON.parse(data, @opts[:read_json_opts]) end
pre_init_conv()
click to toggle source
# File lib/fileconv/json.rb, line 8 def pre_init_conv @opts[:read_json_opts] ||= {} @opts[:write_json_opts] ||= {} end