Class: RTunnel::RemoteListenCommand
- Defined in:
- lib/rtunnel/commands.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Returns the value of attribute address.
Instance Method Summary collapse
- #encode(io) ⇒ Object
-
#initialize(address = nil) ⇒ RemoteListenCommand
constructor
A new instance of RemoteListenCommand.
- #initialize_from_io(io) ⇒ Object
- #to_s ⇒ Object
Methods inherited from Command
command_code, decode, printable_codes, registry, #to_encoded_str
Constructor Details
#initialize(address = nil) ⇒ RemoteListenCommand
Returns a new instance of RemoteListenCommand.
152 153 154 155 |
# File 'lib/rtunnel/commands.rb', line 152 def initialize(address = nil) super() @address = address end |
Instance Attribute Details
#address ⇒ Object (readonly)
Returns the value of attribute address.
150 151 152 |
# File 'lib/rtunnel/commands.rb', line 150 def address @address end |
Instance Method Details
#encode(io) ⇒ Object
167 168 169 170 |
# File 'lib/rtunnel/commands.rb', line 167 def encode(io) super io.write_varstring address end |
#initialize_from_io(io) ⇒ Object
161 162 163 164 165 |
# File 'lib/rtunnel/commands.rb', line 161 def initialize_from_io(io) super @address = io.read_varstring self end |
#to_s ⇒ Object
157 158 159 |
# File 'lib/rtunnel/commands.rb', line 157 def to_s super + "/address=#{address}" end |