Class: Htcp::Message::Specifier
- Defined in:
- lib/htcp/message/specifier.rb
Instance Method Summary collapse
-
#initialize(params) ⇒ Specifier
constructor
A new instance of Specifier.
- #to_s ⇒ Object
Methods inherited from Base
#encode_int16, #encode_int32, #encode_int8, #encode_string
Constructor Details
#initialize(params) ⇒ Specifier
Returns a new instance of Specifier.
4 5 6 |
# File 'lib/htcp/message/specifier.rb', line 4 def initialize(params) @params = params end |
Instance Method Details
#to_s ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/htcp/message/specifier.rb', line 8 def to_s request = '' request << encode_string(@params[:method] || 'GET') request << encode_string(@params[:uri]) request << encode_string(@params[:version] || 'HTTP/1.1') request << encode_string(@params[:headers] || '') return request end |