/**
 *  @provides configurable
 *  @requires util
 */

/**
 *  Interface for configurable objects.
 *
 *  @author epriestley
 */
var /* interface */ Configurable = {
  getOption : function(opt) {
    if (typeof(this.option[opt]) == 'undefined' ) {
      Util.warn(
        'Failed to get option %q; it does not exist.',
        opt);
      return null;
    }
    return this.option[opt];
  },

  setOption : function(opt, v) {
    if (typeof(this.option[opt]) == 'undefined' ) {
      Util.warn(
        'Failed to set option %q; it does not exist.',
        opt);
    } else {
      this.option[opt] = v;
    }

    return this;
  },

  getOptions : function( ) {
    return this.option;
  }

};