Method: Azure::Table::BatchResponse.batch_headers

Defined in:
lib/azure/table/batch_response.rb

.batch_headers(context) ⇒ Object



94
95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/azure/table/batch_response.rb', line 94

def self.batch_headers(context)
  match = /(.*): (.*)/.match(current_line(context))

  if context[:batch_headers] and not match
    return context[:batch_headers]
  elsif match
    context[:batch_headers] ||= {}
    context[:batch_headers][match[1].downcase] = match[2]
    return nil
  else
    return nil
  end
end