class Babelish::CSV2JSON
Public Instance Methods
extension()
click to toggle source
# File lib/babelish/csv2json.rb, line 17 def extension "json" end
hash_to_output(content = {})
click to toggle source
# File lib/babelish/csv2json.rb, line 13 def hash_to_output(content = {}) return content.to_json end
language_filepaths(language)
click to toggle source
# File lib/babelish/csv2json.rb, line 5 def language_filepaths(language) require 'pathname' filename = @output_basename || language.code filepath = Pathname.new("#{@output_dir}#{filename}.#{extension}") return filepath ? [filepath] : [] end