Class: Warchat::Network::Request::StringSocket
- Inherits:
-
Object
- Object
- Warchat::Network::Request::StringSocket
- Defined in:
- lib/warchat/network/request.rb
Instance Method Summary collapse
-
#initialize ⇒ StringSocket
constructor
A new instance of StringSocket.
- #length ⇒ Object
- #print(obj) ⇒ Object
- #value ⇒ Object
Constructor Details
#initialize ⇒ StringSocket
Returns a new instance of StringSocket.
6 7 8 |
# File 'lib/warchat/network/request.rb', line 6 def initialize @stream = "" end |
Instance Method Details
#length ⇒ Object
14 15 16 |
# File 'lib/warchat/network/request.rb', line 14 def length @stream.length end |
#print(obj) ⇒ Object
10 11 12 |
# File 'lib/warchat/network/request.rb', line 10 def print obj @stream << obj.to_s end |
#value ⇒ Object
18 19 20 |
# File 'lib/warchat/network/request.rb', line 18 def value @stream end |