Extended maintenance of Ruby versions 1.8.7 and 1.9.2 will end on July 31, 2014. Read more

In Files

  • xmlrpc/httpserver.rb

Parent

Included Modules

HttpServer::Table

a case-insensitive Hash class for HTTP header

Public Class Methods

new(hash={}) click to toggle source
 
               # File xmlrpc/httpserver.rb, line 84
def initialize(hash={})
  @hash = hash 
  update(hash)
end
            

Public Instance Methods

[](key) click to toggle source
 
               # File xmlrpc/httpserver.rb, line 89
def [](key)
  @hash[key.to_s.capitalize]
end
            
[]=(key, value) click to toggle source
 
               # File xmlrpc/httpserver.rb, line 93
def []=(key, value)
  @hash[key.to_s.capitalize] = value
end
            
each() click to toggle source
 
               # File xmlrpc/httpserver.rb, line 102
def each
  @hash.each {|k,v| yield k.capitalize, v }
end
            
update(hash) click to toggle source
 
               # File xmlrpc/httpserver.rb, line 97
def update(hash)
  hash.each {|k,v| self[k] = v}
  self
end
            
writeTo(port) click to toggle source
 
               # File xmlrpc/httpserver.rb, line 106
def writeTo(port)
  each { |k,v| port << "#{k}: #{v}" << CRLF }
end
            

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.

blog comments powered by Disqus