module.exports = class Inflector
  # contrib
  inflection = require '../dep/inflection'
  
  Object
    .keys(inflection)
    .forEach (key)->
      # copy of the properties of inflection.
      Inflector[key] = inflection[key]
      # add chainable methods to the prototype:
      Inflector::[key] = ->
        @value = Inflector[key] @value, arguments...
        @
  
  constructor:(value)->
    unless @ instanceof Inflector
      return new Inflector value
    else
      @value = value
  
  tap:(callback)->
    callback @value
    @  
  
  inspect:-> @+''
  
  toString:-> @value
  
  valueOf:-> @value
