'use strict';

var Bluebird = require('bluebird');
var _path    = require('path');
var redefine = require('redefine');

module.exports = redefine.Class({
  constructor: function(path) {
    this.file = _path.basename(path);
    this.path = path;
  },

  migration: function () {
    return require(this.path);
  },

  up: function () {
    return (this.migration().up || Bluebird.resolve)();
  },

  down: function () {
    return (this.migration().down || Bluebird.resolve)();
  }
});

@@ -192,12 +192,12 @@
 his.
-file
+path
  = _
@@ -205,15 +205,14 @@
 ath.
-basenam
+resolv
 e(pa
@@ -229,21 +229,43 @@
 his.
-path = 
+file = _path.basename(this.
 path
+)
 ;%0A
+ 
   %7D,

Resolve the passed path