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) +@



542
543
544
# File 'lib/irc/rfc2812/commands.rb', line 542

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

- (Object) -@



538
539
540
# File 'lib/irc/rfc2812/commands.rb', line 538

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