class Tardef::Connector::JSON

Public Instance Methods

read_file() click to toggle source
# File lib/tardef/connector/json.rb, line 6
def read_file
  file = open(@filename)
  json = ::JSON.load(file)
end
write_file(data) click to toggle source
# File lib/tardef/connector/json.rb, line 11
def write_file(data)
  json = ::JSON.pretty_generate(data)
  ::File.open(@filename, "w") { |f| f.write(json) }
end