Class: Circus::Messages::Join

Inherits:
Object
  • Object
show all
Defined in:
lib/irc/messages/join.rb

Instance Method Summary collapse

Constructor Details

#initialize(channel) ⇒ Join

Returns a new instance of Join.



5
6
7
# File 'lib/irc/messages/join.rb', line 5

def initialize(channel)
  @channel = channel
end

Instance Method Details

#to_sObject



9
10
11
12
13
14
15
# File 'lib/irc/messages/join.rb', line 9

def to_s
  if @channel =~ /^\#/
    "JOIN #{@channel}"
  else
    "JOIN ##{@channel}"
  end
end