modifiable

modifiable() Instance Protected methods Used internally to check if the OpenStruct is able to be modified before granting access to the internal Hash table to be modified.

new_ostruct_member

new_ostruct_member(name) Instance Protected methods Used internally to defined properties on the OpenStruct. It does this by using the metaprogramming function define_singleton_method for both the getter method and the setter method.

new

new(message, io) Class Public methods

new

new(message, io, uri) Class Public methods

charset

charset() Instance Public methods returns a charset parameter in Content-Type field. It is downcased for canonicalization. If charset parameter is not given but a block is given, the block is called and its result is returned. It can be used to guess charset. If charset parameter and block is not given, nil is returned except text type in HTTP. In that case, âiso-8859-1â is returned as defined by RFC2616 3.7.1.

content_encoding

content_encoding() Instance Public methods Returns a list of encodings in Content-Encoding field as an array of strings. The encodings are downcased for canonicalization.

content_type

content_type() Instance Public methods returns âtype/subtypeâ which is MIME Content-Type. It is downcased for canonicalization. Content-Type parameters are stripped.

last_modified

last_modified() Instance Public methods returns a Time that represents the Last-Modified field.

open

open(*rest, &block) Instance Public methods #open provides `open' for URI::HTTP and URI::FTP. #open takes optional 3 arguments as: OpenURI::OpenRead#open([mode [, perm]] [, options]) [{|io| ... }] #open returns an IO-like object if block is not given. Otherwise it yields the IO object and return the value of the block. The IO object is extended with OpenURI::Meta. mode and perm are the same as Kernel#open. However, mode must be read mode because #open doesn't support write mod

read

read(options={}) Instance Public methods #read) reads a content referenced by self and returns the content as string. The string is extended with OpenURI::Meta. The argument options is same as #open.