How to use the ember-cli-addon-docs/models/module.extend function in ember-cli-addon-docs

To help you get started, we’ve selected a few ember-cli-addon-docs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Cropster / ember-visual-test / tests / dummy / app / models / module.js View on Github external
import BaseModule from 'ember-cli-addon-docs/models/module';
import { get } from '@ember/object';
import fixWindowsPath from 'dummy/utils/fix-windows-path';

export default BaseModule.extend({

  init() {
    // On Windows, IDs might be wrong (coming from Yuidoc)
    // Since we can't change the ID, we make a copy of the record with the fixed ID
    let id = get(this, 'id');
    if (id && id.startsWith('C:')) {
      this._copyForId();
    }

    this._super(...arguments);
  },

  _copyForId() {
    // Fix IDs on Windows
    let { id, file, functions, variables, classes, components } = this;