Module: MinceDynamoDb::DataSanitizer

Defined in:
lib/mince_dynamo_db/data_sanitizer.rb

Class Method Summary collapse

Class Method Details

.prepare_field_for_storage(field) ⇒ Object


3
4
5
# File 'lib/mince_dynamo_db/data_sanitizer.rb', line 3

def self.prepare_field_for_storage(field)
  field.is_a?(Numeric) ? field : field.to_s
end

.prepare_hash_for_storage(hash) ⇒ Object


7
8
9
# File 'lib/mince_dynamo_db/data_sanitizer.rb', line 7

def self.prepare_hash_for_storage(hash)
  hash.each{|key, value| hash[key] = prepare_field_for_storage(value) }
end