Class: Dynamoid::Dumping::CustomTypeDumper
- Defined in:
- lib/dynamoid/dumping.rb
Overview
any object -> 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
280 281 282 283 284 285 286 287 288 289 290 |
# File 'lib/dynamoid/dumping.rb', line 280 def process(value) field_class = [:type] if value.respond_to?(:dynamoid_dump) value.dynamoid_dump elsif field_class.respond_to?(:dynamoid_dump) field_class.dynamoid_dump(value) else raise ArgumentError, "Neither #{field_class} nor #{value} supports serialization for Dynamoid." end end |