Class: IRC::Commands::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/irc/commands/command.rb

Instance Method Summary collapse

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

#commandObject

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_sObject

Returns the command as a string.



49
50
51
# File 'lib/irc/commands/command.rb', line 49

def to_s
  return command
end