Class: Circus::Messages::Join
- Inherits:
-
Object
- Object
- Circus::Messages::Join
- Defined in:
- lib/irc/messages/join.rb
Instance Method Summary collapse
-
#initialize(channel) ⇒ Join
constructor
A new instance of Join.
- #to_s ⇒ Object
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_s ⇒ Object
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 |