Class: Rubtella::TCPData::Builder::Query
- Inherits:
-
Rubtella::TCPData::Builder
- Object
- Rubtella::TCPData::Base
- Rubtella::TCPData::Builder
- Rubtella::TCPData::Builder::Query
- Defined in:
- lib/rubtella/tcp_data.rb
Constant Summary
Constants included from Config
Config::GUID, Config::IP_ADDRESS, Config::PID_FILE, Config::PORT
Instance Attribute Summary
Attributes inherited from Rubtella::TCPData::Base
#binary_data, #guid, #hops, #messages, #messages_codes, #payload_lenght, #payload_type, #rest, #ttl
Instance Method Summary collapse
- #build_message ⇒ Object
-
#initialize(args = nil) ⇒ Query
constructor
A new instance of Query.
Methods inherited from Rubtella::TCPData::Builder
Methods included from Config
Constructor Details
#initialize(args = nil) ⇒ Query
Returns a new instance of Query.
105 106 107 108 109 110 111 112 113 |
# File 'lib/rubtella/tcp_data.rb', line 105 def initialize args = nil super() @payload_type = ["query"] @speed = 0 @criteria = args.is_a?(Hash) ? args[:criteria] : "" end |
Instance Method Details
#build_message ⇒ Object
115 116 117 |
# File 'lib/rubtella/tcp_data.rb', line 115 def @payload = [@speed, @criteria.unpack("C*")] end |