Class: Conquiro::SearchAPI::ResultSerializer
- Inherits:
-
Object
- Object
- Conquiro::SearchAPI::ResultSerializer
- Defined in:
- lib/conquiro/search_api/result_serializer.rb
Class Method Summary collapse
Class Method Details
.serializer_for(attributes) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/conquiro/search_api/result_serializer.rb', line 6 def self.serializer_for(attributes) wrapper_type = attributes.delete(:kind) case wrapper_type when /software/i then Conquiro::SearchAPI::SoftwareSerializer.new(attributes) else raise "Unsupported serializer type: #{wrapper_type}." end end |