class UserAgent

def initialize(product, version = nil, comment = nil)

def initialize(product, version = nil, comment = nil)
  if product
    @product = product
  else
    raise ArgumentError, "expected a value for product"
  end
  if version && !version.empty?
    @version = Version.new(version)
  else
    @version = Version.new
  end
  if comment.respond_to?(:split)
    @comment = comment.split("; ")
  else
    @comment = comment
  end
end