Class: StudentListJSON

Inherits:
StudentListStrategy show all
Defined in:
lib/source/repositories/data_sources/strategy/student_list_json.rb

Instance Method Summary collapse

Instance Method Details

#list_to_str(list) ⇒ Object



13
14
15
# File 'lib/source/repositories/data_sources/strategy/student_list_json.rb', line 13

def list_to_str(list)
  JSON.generate(list)
end

#str_to_list(str) ⇒ Object



9
10
11
# File 'lib/source/repositories/data_sources/strategy/student_list_json.rb', line 9

def str_to_list(str)
  JSON.parse(str, { symbolize_names: true })
end