Class: Symbol

Inherits:
Object
  • Object
show all
Defined in:
lib/irc/rfc2812/commands.rb

Overview

Syntax sugar for fancy IRC modes (i.e. +:a and -:a).

Instance Method Summary collapse

Instance Method Details

#+@Object



557
558
559
# File 'lib/irc/rfc2812/commands.rb', line 557

def +@
  to_s.start_with?('+', '-') ? :"+#{to_s[1..-1]}" : :"+#{self}"
end

#-@Object



553
554
555
# File 'lib/irc/rfc2812/commands.rb', line 553

def -@
  to_s.start_with?('+', '-') ? :"-#{to_s[1..-1]}" : :"-#{self}"
end