module Scrivito class ObjCreateParamsParser < Struct.new(:host, :port) include ObjParamsParser private def convert_params(params) if obj_class_name = params['_obj_class'] model_class = Obj.type_computer.compute_type(obj_class_name) convert_field_params(params, model_class.attribute_definitions) else raise ArgumentError, 'Missing "_obj_class" param' end end end end