Class: RTunnel::ConnectionCommand
Direct Known Subclasses
Constant Summary collapse
- RE =
%r{^([^|]+)\|}
Constants inherited from Command
RTunnel::Command::CLASSES_TO_CODES, RTunnel::Command::CODES_TO_CLASSES
Instance Attribute Summary collapse
-
#conn_id ⇒ Object
readonly
Returns the value of attribute conn_id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(conn_id) ⇒ ConnectionCommand
constructor
A new instance of ConnectionCommand.
- #to_s ⇒ Object
Constructor Details
#initialize(conn_id) ⇒ ConnectionCommand
Returns a new instance of ConnectionCommand.
37 38 39 |
# File 'lib/cmds.rb', line 37 def initialize(conn_id) @conn_id = conn_id end |
Instance Attribute Details
#conn_id ⇒ Object (readonly)
Returns the value of attribute conn_id.
35 36 37 |
# File 'lib/cmds.rb', line 35 def conn_id @conn_id end |
Class Method Details
.match(data) ⇒ Object
59 60 61 |
# File 'lib/cmds.rb', line 59 def match(data) !! (data =~ RE) end |
Instance Method Details
#to_s ⇒ Object
41 42 43 |
# File 'lib/cmds.rb', line 41 def to_s super + "#{conn_id}|" end |