module Mumukit::Sync::Store::WithWrappedLanguage
Public Instance Methods
transform_after_symbolize(key, json)
click to toggle source
# File lib/mumukit/sync/store/with_wrapped_language.rb, line 2 def transform_after_symbolize(key, json) if key.like? :guide guide = json.dup wrap_language! guide guide[:exercises].each { |exercise| wrap_language! exercise } guide else json end end
wrap_language!(hash)
click to toggle source
# File lib/mumukit/sync/store/with_wrapped_language.rb, line 13 def wrap_language!(hash) hash[:language] &&= { name: hash[:language] } end