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