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.
7 8 9 10 |
# File 'lib/httparty/headers_processor.rb', line 7 def initialize(headers, ) @headers = headers @options = end |
Instance Attribute Details
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
5 6 7 |
# File 'lib/httparty/headers_processor.rb', line 5 def headers @headers end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/httparty/headers_processor.rb', line 5 def @options end |
Instance Method Details
#call ⇒ Object
12 13 14 15 16 17 |
# File 'lib/httparty/headers_processor.rb', line 12 def call return unless [:headers] [:headers] = headers.merge([:headers]) if headers.any? [:headers] = Utils.stringify_keys(process_dynamic_headers) end |