
class Symbol

  def not?
    self.to_s.slice(0,1) == '~'
  end

  def ~@
    if self.to_s.slice(0,1) == '~'
      "#{self.to_s[1..-1]}".to_sym
    else
      "~#{self}".to_sym
    end
  end

end


#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#
=begin test

  require 'test/unit'

  class TCSymbol < Test::Unit::TestCase

    def test_not
      assert_equal( :"~a", ~:a )
      a = :a
      n = ~a
      assert( n.not? )
    end

  end

=end
