Sha256: cd57591ee152414bfd0fb49afaea6f8d57d1b8d2a31e14cf258a1794179a767b

Contents?: true

Size: 295 Bytes

Versions: 8

Compression:

Stored size: 295 Bytes

Contents

require 'json'
require_relative '../converters/Converter'
class ConverterJSON < Converter
	public_class_method :new

	def read_file(file_content)
		JSON.parse(file_content, {symbolize_names: true})
	end

	def write_file(hash_students)
		JSON.pretty_generate(hash_students)
	end

end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
mvcStudentXD-1.2.3 lib/source/converters/Converter_json.rb
mc_gem-0.0.1 mc_gem/lib/source/converters/Converter_json.rb
mvcStudentXD-1.2.2 lib/source/converters/Converter_json.rb
mvcStudentXD-1.2.1 mvcStudentXD/lib/source/converters/Converter_json.rb
mvcStudentXD-1.2.0 lib/source/converters/Converter_json.rb
mvcStudentXD-1.1.3 lib/source/converters/Converter_json.rb
mvcStudentXD-1.1.2 lib/converters/Converter_json.rb
mvcStudentXD-1.1.1 lib/converters/Converter_json.rb