Module: Sunstore::Handler

Defined in:
lib/sunstore/handler.rb

Defined Under Namespace

Classes: JSON, YAML

Class Method Summary collapse

Class Method Details

.for(protocol) ⇒ Object



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