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
323 324 325 326 327 328 329 330 331 332 333 |
# File 'lib/dynamoid/dumping.rb', line 323 def process(value) field_class = @options[: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 |