all files / src/ one-path.ts

100% Statements 7/7
100% Branches 0/0
100% Functions 3/3
100% Lines 7/7
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16    11× 11×   11×            
import { PathInterface } from './path.interface';
export class RestangularOnePath implements PathInterface {
  public primaryKey: string;
 
  constructor(
    public endpoint: string,
    primaryKey: string | number
  ) {
    this.primaryKey = primaryKey.toString();
  }
 
  public path(): Array<string> {
    return [this.endpoint, this.primaryKey];
  }
}