Class: HTTParty::HeadersProcessor
- Inherits:
-
Object
- Object
- HTTParty::HeadersProcessor
- Defined in:
- lib/httparty/headers_processor.rb
Instance Attribute Summary collapse
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(headers, options) ⇒ HeadersProcessor
constructor
A new instance of HeadersProcessor.
Constructor Details
#initialize(headers, options) ⇒ HeadersProcessor
Returns a new instance of HeadersProcessor.
5 6 7 8 |
# File 'lib/httparty/headers_processor.rb', line 5 def initialize(headers, ) @headers = headers @options = end |
Instance Attribute Details
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
3 4 5 |
# File 'lib/httparty/headers_processor.rb', line 3 def headers @headers end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
3 4 5 |
# File 'lib/httparty/headers_processor.rb', line 3 def @options end |
Instance Method Details
#call ⇒ Object
10 11 12 13 14 15 |
# File 'lib/httparty/headers_processor.rb', line 10 def call return unless [:headers] [:headers] = headers.merge([:headers]) if headers.any? [:headers] = Utils.stringify_keys(process_dynamic_headers) end |