Class: LCDProc::Command

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

Overview

This class exists for the sole purpose of expansion. I cannot currently think of any reason why we would need more than a simple string to be sent to the server, however, in the future, it may make more sense to send the command and some arguments.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message) ⇒ Command

Creates a new Command object.

  • message - The message/command to be sent to the server.

Example:

hello = Command.new( "hello" )
client.send( hello )

or

client.send( Command.new( "info" ) )


48
49
50
# File 'lib/lcdproc/command.rb', line 48

def initialize( message )
  @message = message
end

Instance Attribute Details

#messageObject (readonly)

Returns the value of attribute message.



33
34
35
# File 'lib/lcdproc/command.rb', line 33

def message
  @message
end