visitConstructModel()

in lib/common_generator.js [370:379]


  visitConstructModel(ast, level) {
    assert.equal(ast.type, 'construct_model');
    this.visitType(ast.inferred);
    this.emit(`.builder()`);
    if (ast.object && ast.object.fields && ast.object.fields.length > 0) {
      this.visitBuilderMethod(ast.object, level);
    }
    this.emit(`\n`);
    this.emit(`.build()`, level + 2);
  }