 
   contentType: 'text/plain'
 
-  ###
-  Text.encoding (getter/setter)
-  =============================
-
-  Get or set the encoding (charset) used for re-encoding the raw
-  source of the asset. To affect the initial decoding of the
-  `rawSrc` option, provide the `encoding` option to the
-  constructor.
+  ###*
+  * Get or set the encoding (charset) used for re-encoding the raw source of
+    the asset. To affect the initial decoding of the `rawSrc` option, provide
+    the `encoding` option to the constructor.
   ###
   @getter 'encoding', ->
     @_encoding = @defaultEncoding  unless @_encoding

    assetGraph.addAsset this  if assetGraph
    @markDirty()

  ###
  text.text (getter/setter)
  =========================

  Get or set the decoded text contents of the of the asset as a
  JavaScript string. Unlike browsers AssetGraph doesn't try to
  sniff the charset of your text-based assets. It will fall back
  to assuming utf-8 if it's unable to determine the
  encoding/charset from HTTP headers, `<meta
  http-equiv='Content-Type'>` tags (Html), `@charset` (Css), so
  if for some reason you're not using utf-8 for all your
  text-based assets, make sure to provide those hints. Other
  asset types provide no standard way to specify the charset
  within the file itself, so presently there's no way to load
  eg. JavaScript from disc if it's not utf-8 or ASCII, except by
  overriding `Text.prototype.defaultEncoding` globally.

  If the internal state has been changed since the asset was
  initialized, it will automatically be reserialized when the
  `text` property is retrieved, for example:

  var htmlAsset = new Html({
  rawSrc: new Buffer("<body>hello</body>");
  });
  htmlAsset.text; // "<body>hello</body>"
  htmlAsset.parseTree.body.innerHTML = "bye";
  htmlAsset.markDirty();
  htmlAsset.text; // "<body>bye</body>"

  Setting this property after the outgoing relations have been
  accessed currently leads to undefined behavior.
  ###
  @getter 'text', ->
    @_text = @_getTextFromRawSrc() unless '_text' of this

      delete config.encoding
    super config

  ###*
   * Property that's true for all Text instances. Avoids reliance on the
     `instanceof` operator.
  ###
  isText: true

  ###*
   * The default encoding for the Text (sub)class. Used for decoding the raw
     source when the encoding cannot be determined by other means, such as a
     `Content-Type` header (when the asset was fetched via http), or another
     indicator specific to the given asset type (`@charset` for Css, `<meta
     http-equiv="Content-Type" ...>` for Html).
   * Factory setting is "utf-8", but you can override it by setting
     `Text.prototype.defaultEncoding` to another value supported by the
     `iconv` module.
  ###
  defaultEncoding: 'utf-8'

