def delegate_surrealization_to(klass)
      raise TypeError, "Expected type of Class got #{klass.class} instead" unless klass.is_a?(Class)

      Surrealist::ExceptionRaiser.raise_invalid_schema_delegation! unless Helper.surrealist?(klass)

      hash = Surrealist::VarsHelper.find_schema(klass)
      Surrealist::VarsHelper.set_schema(self, hash)
    end
def delegate_surrealization_to(klass)
      raise TypeError, "Expected type of Class got #{klass.class} instead" unless klass.is_a?(Class)

      Surrealist::ExceptionRaiser.raise_invalid_schema_delegation! unless Helper.surrealist?(klass)

      hash = Surrealist::VarsHelper.find_schema(klass)
      Surrealist::VarsHelper.set_schema(self, hash)
    end
A DSL method to delegate schema in a declarative style. Must reference a valid
 class that includes Surrealist

 @param [Class] klass

 @example DSL usage example
   class Host
     include Surrealist

     json_schema do
       { name: String }
     end

     def name
       'Parent'
     end
   end

   class Guest < Host
     delegate_surrealization_to Host

     def name
       'Child'
     end
   end

   Guest.new.surrealize
   # => "{\"name\":\"Child\"}"
   # For more examples see README