Classes: JSON, YAML
7 8 9 10 11 12 13 14
# File 'lib/sunstore/handler.rb', line 7 def self.for(protocol) case protocol when :yaml then YAML.new when :json then JSON.new else raise "Only :yaml and :json currently supported" end end