Class: IRC::Commands::Command
- Inherits:
-
Object
- Object
- IRC::Commands::Command
- Defined in:
- lib/irc/commands/command.rb
Direct Known Subclasses
JoinCommand, NickCommand, PartCommand, PasswordCommand, PingCommand, PongCommand, QuitCommand, UserCommand
Instance Method Summary collapse
-
#command ⇒ Object
Returns the command as a string.
-
#initialize(raw_command = "") ⇒ Command
constructor
A new instance of Command.
-
#send(io) ⇒ Object
Sends the command to the io object.
-
#to_s ⇒ Object
Returns the command as a string.
Constructor Details
#initialize(raw_command = "") ⇒ Command
Returns a new instance of Command.
34 35 36 |
# File 'lib/irc/commands/command.rb', line 34 def initialize(raw_command = "") @raw_command = raw_command end |
Instance Method Details
#command ⇒ Object
Returns the command as a string.
39 40 41 |
# File 'lib/irc/commands/command.rb', line 39 def command return @raw_command end |
#send(io) ⇒ Object
Sends the command to the io object.
44 45 46 |
# File 'lib/irc/commands/command.rb', line 44 def send(io) io << self end |
#to_s ⇒ Object
Returns the command as a string.
49 50 51 |
# File 'lib/irc/commands/command.rb', line 49 def to_s return command end |