import Ember from 'ember';

// LAME, but ¯\_(ツ)_/¯
export default function hasEmberVersion(major, minor) {
  var numbers = Ember.VERSION.split('-')[0].split('.');
  var actualMajor = parseInt(numbers[0], 10);
  var actualMinor = parseInt(numbers[1], 10);
  return actualMajor > major || (actualMajor === major && actualMinor >= minor);
}

export const attributeMungingMethod = (function() {
  if (hasEmberVersion(2, 9)) {
    return 'didReceiveAttrs';
  } else {
    return `willRender`;
  }
})();

import Ember from 'ember';

// LAME, but ¯\_(ツ)_/¯
export default function hasEmberVersion(major, minor) {
  var numbers = Ember.VERSION.split('-')[0].split('.');
  var actualMajor = parseInt(numbers[0], 10);
  var actualMinor = parseInt(numbers[1], 10);
  return actualMajor > major || (actualMajor === major && actualMinor >= minor);
}

export const attributeMungingMethod = (function() {
  if (hasEmberVersion(2, 10)) {
    return 'didReceiveAttrs';
  } else {
    return `willRender`;
  }
})();

Use correct link-to method for 2.9.0.