Class: Dynamoid::Dumping::BooleanDumper
- Defined in:
- lib/dynamoid/dumping.rb
Overview
True/False -> True/False/string
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Dynamoid::Dumping::Base
Instance Method Details
#process(value) ⇒ Object
262 263 264 265 266 267 268 269 270 271 272 273 274 275 |
# File 'lib/dynamoid/dumping.rb', line 262 def process(value) unless value.nil? store_as_boolean = if @options[:store_as_native_boolean].nil? Dynamoid.config.store_boolean_as_native else @options[:store_as_native_boolean] end if store_as_boolean !!value else value.to_s[0] # => "f" or "t" end end end |