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
284 285 286 287 288 289 290 291 292 293 294 295 296 297 |
# File 'lib/dynamoid/dumping.rb', line 284 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 |