Sha256: d57ae1ff410b58b1483c551794e6204ae1ebc4e831d88c04d2bd7b32b58ccc4e

Contents?: true

Size: 324 Bytes

Versions: 8

Compression:

Stored size: 324 Bytes

Contents

require 'yaml'
require_relative '../verter'
class ConverterYAML < Converter
	public_class_method :new
	
	def read_file(file_content)
		YAML.safe_load(file_content).map{ |h| h.transform_keys(&:to_sym)}
	end

	def write_file(hash_students)
		YAML.dump(hash_students.map{ |h| h.transform_keys(&:to_s)})
	end

end

Version data entries

8 entries across 8 versions & 2 rubygems

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