// Generated by CoffeeScript 1.9.1
(function() {
  var Blob, path;

  path = require('path');

  module.exports = Blob = (function() {
    function Blob(repo, attrs) {
      this.repo = repo;
      this.id = attrs.id, this.name = attrs.name, this.mode = attrs.mode;
    }

    Blob.prototype.data = function(callback) {
      return this.repo.git("cat-file", {
        p: true
      }, this.id, function(err, stdout, stderr) {
        return callback(err, stdout);
      }, 'binary');
    };

    Blob.prototype.dataStream = function() {
      var streams;
      streams = this.repo.git.streamCmd("cat-file", {
        p: true
      }, [this.id]);
      return streams;
    };

    Blob.prototype.toString = function() {
      return "#<Blob '" + this.id + "'>";
    };

    return Blob;

  })();

}).call(this);
