Class: Nsqrb::Command::Pub

Inherits:
Nsqrb::Command show all
Defined in:
lib/nsqrb/command/pub.rb

Instance Method Summary collapse

Methods inherited from Nsqrb::Command

#error?, #initialize, #ok?

Constructor Details

This class inherits a constructor from Nsqrb::Command

Instance Method Details

#to_lineObject



4
5
6
7
# File 'lib/nsqrb/command/pub.rb', line 4

def to_line
  msg = @args[:message].to_s
  [name, ' ', @args[:topic_name], "\n", msg.length, msg].pack('a*a*a*a*l>a*')
end