Class: FSR::Listener::HeaderAndContentResponse
- Inherits:
-
Object
- Object
- FSR::Listener::HeaderAndContentResponse
- Defined in:
- lib/fsr/listener/header_and_content_response.rb
Instance Attribute Summary (collapse)
-
- (Object) content
readonly
Returns the value of attribute content.
-
- (Object) headers
readonly
Returns the value of attribute headers.
Instance Method Summary (collapse)
-
- (Object) body
Keep backward compat with the other 2 people who use FSR.
-
- (HeaderAndContentResponse) initialize(args = {})
constructor
A new instance of HeaderAndContentResponse.
- - (Object) strip_newlines
Constructor Details
- (HeaderAndContentResponse) initialize(args = {})
A new instance of HeaderAndContentResponse
9 10 11 12 13 |
# File 'lib/fsr/listener/header_and_content_response.rb', line 9 def initialize(args = {}) @headers = args[:headers] @content = args[:content] strip_newlines end |
Instance Attribute Details
- (Object) content (readonly)
Returns the value of attribute content
7 8 9 |
# File 'lib/fsr/listener/header_and_content_response.rb', line 7 def content @content end |
- (Object) headers (readonly)
Returns the value of attribute headers
7 8 9 |
# File 'lib/fsr/listener/header_and_content_response.rb', line 7 def headers @headers end |
Instance Method Details
- (Object) body
Keep backward compat with the other 2 people who use FSR
20 21 22 |
# File 'lib/fsr/listener/header_and_content_response.rb', line 20 def body @content end |
- (Object) strip_newlines
15 16 17 |
# File 'lib/fsr/listener/header_and_content_response.rb', line 15 def strip_newlines @content.each {|k,v| v.chomp! if v.is_a?(String)} end |