Sha256: 685d93187902c6fa76c7fbdb0216e180fc0f66433cdf3bda889a588838bf9dc9

Contents?: true

Size: 324 Bytes

Versions: 6

Compression:

Stored size: 324 Bytes

Contents

require 'yaml'
require_relative 'Converter'
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

6 entries across 6 versions & 4 rubygems

Version Path
mc_gem3-1.0.2 lib/source/Converter_yaml.rb
mc_gem3-1.0.0 lib/source/Converter_yaml.rb
mc_gem2-1.1.5 lib/source/Converter_yaml.rb
mc_gem2-1.1.4 lib/source/Converter_yaml.rb
mvcStudentXD-1.0.1 lib/Converter_yaml.rb
model_XD-0.1.0 lib/Converter_yaml.rb