 # + Each argument may have multiple discussions.
 #
 class Discussion
+
+  @ValidationError = Errors.Validation
 
   # Creates a discussion instance.
   #

_       = require 'underscore'
User    = require '../../lib/argumenta/user'
Commit  = require '../../lib/argumenta/objects/commit'

#
# Discussion represents a conversation about a published argument.


  @validateTargetType: (targetType) ->
    unless _.isString targetType
      throw new @ValidationError "Discussion target type must be a string."

    unless targetType is 'argument'
      throw new @ValidationError "Discussion target must be an argument."

    return true

