Class: Dragoon::Receiver
Overview
RFC 1459 section 4.4.1
a receiver can be
a nickname,
a channel
Instance Method Summary collapse
-
#channel? ⇒ Boolean
checks if first character of is #.
-
#initialize(raw_string) ⇒ Receiver
constructor
A new instance of Receiver.
- #nickname? ⇒ Boolean
Methods inherited from String
Constructor Details
#initialize(raw_string) ⇒ Receiver
Returns a new instance of Receiver.
10 11 12 |
# File 'lib/dragoon/receiver.rb', line 10 def initialize(raw_string) super(raw_string) end |
Instance Method Details
#channel? ⇒ Boolean
checks if first character of is #
14 15 16 |
# File 'lib/dragoon/receiver.rb', line 14 def channel? self[0].chr == "#" end |
#nickname? ⇒ Boolean
18 19 20 |
# File 'lib/dragoon/receiver.rb', line 18 def nickname? !channel? end |