class CleanHash def self.create type, data={} case type when :indifferent ::CleanHash::Indifferent.new data when :safe ::CleanHash::Safe.new data when :strict ::CleanHash::Strict.new data when :stuct ::CleanHash.create_strut data when :mutex ::CleanHash::MutexHash.new data else raise ArgumentError, 'Unsupported type: %s' % type end end end