Class: FSR::Listener::HeaderAndContentResponse
- Inherits:
-
Object
- Object
- FSR::Listener::HeaderAndContentResponse
- Defined in:
- lib/fsr/listener/header_and_content_response.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
Instance Method Summary collapse
-
#body ⇒ Object
Keep backward compat with the other 2 people who use FSR.
-
#initialize(args = {}) ⇒ HeaderAndContentResponse
constructor
A new instance of HeaderAndContentResponse.
- #strip_newlines ⇒ Object
Constructor Details
#initialize(args = {}) ⇒ HeaderAndContentResponse
Returns 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
#content ⇒ Object (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 |
#headers ⇒ Object (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
#body ⇒ Object
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 |
#strip_newlines ⇒ Object
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 |