Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
http-protocol / lib / http / protocol / headers / resolve.rb
Size: Mime:
module HTTP
  module Protocol
    class Headers
      module Resolve
        def resolve(header_name)
          handler_cls_name = Util.to_camel_case header_name

          cls = self
          until cls == Headers.superclass
            if cls.const_defined? handler_cls_name
              subclass = cls.const_get handler_cls_name
              return subclass.build
            end
            cls = cls.superclass
          end

          Handler::CustomHeader.build header_name
        end
      end
    end
  end
end