Class: Dynamoid::TypeCasting::StringTypeCaster

Inherits:
Base
  • Object
show all
Defined in:
lib/dynamoid/type_casting.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Dynamoid::TypeCasting::Base

Instance Method Details

#process(value) ⇒ Object



59
60
61
62
63
64
65
66
67
68
69
# File 'lib/dynamoid/type_casting.rb', line 59

def process(value)
  if value == true
    't'
  elsif value == false
    'f'
  elsif value.is_a? String
    value.dup
  else
    value.to_s
  end
end