class Babelish::JSON2CSV
Public Class Methods
new(args = {:filenames => []})
click to toggle source
Calls superclass method
Babelish::Base2Csv::new
# File lib/babelish/json2csv.rb, line 5 def initialize(args = {:filenames => []}) super(args) end
Public Instance Methods
load_strings(strings_filename)
click to toggle source
# File lib/babelish/json2csv.rb, line 9 def load_strings(strings_filename) strings = {} raise Errno::ENOENT unless File.exist?(strings_filename) json_file = File.open(strings_filename, 'r') json_string = json_file.read json_file.close strings = JSON.parse(json_string).to_hash return strings end