Class: HttpStub::Models::Headers
- Inherits:
-
Hash
- Object
- Hash
- HttpStub::Models::Headers
- Defined in:
- lib/http_stub/models/headers.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(headers) ⇒ Headers
constructor
A new instance of Headers.
- #to_s ⇒ Object
Constructor Details
#initialize(headers) ⇒ Headers
Returns a new instance of Headers.
6 7 8 |
# File 'lib/http_stub/models/headers.rb', line 6 def initialize(headers) self.merge!(headers || {}) end |
Instance Method Details
#to_s ⇒ Object
10 11 12 |
# File 'lib/http_stub/models/headers.rb', line 10 def to_s self.map { |key_and_value| key_and_value.map(&:to_s).join(":") }.join(", ") end |