Sha256: 3189cca3c25405f84944c008701afae4bfc8da3dd49a33b8ba1e8ad9bdf672ab

Contents?: true

Size: 338 Bytes

Versions: 1

Compression:

Stored size: 338 Bytes

Contents

require 'curb-fu'

module CurbFu
  module Response
    # :nodoc: all
    class Base
      def get_fields(key)
        if (match = @headers.find { |k, _| k.downcase == key.downcase })
          [match.last].flatten
        else
          []
        end
      end

      def [](key)
        get_fields(key).last
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fastly-1.1.5 lib/ext/curb_fu/response/base.rb