trailsjs/trails-controller

View on GitHub
index.js

Summary

Maintainability
A
0 mins
Test Coverage
'use strict'

/**
 * Trails Controller Class.
 */
module.exports = class TrailsController {

  constructor (app) {
    Object.defineProperty(this, 'app', {
      enumerable: false,
      value: app
    })
  }

  /**
   * Controller configuration
   */
  static config () {
  }

  /**
   * Return the id of this controller
   */
  get id () {
    return this.constructor.name.replace(/(\w+)Controller/, '$1').toLowerCase()
  }

  get log () {
    return this.app.log
  }

  get __ () {
    return this.app.__
  }
}