Class CGIKit::ByteData
In: lib/cgikit/bytedata.rb
Parent: Object

ByteData objects manage bytes.

Methods

<<   ==   bytes   close   each   length   new   new_with_file   new_with_io   open   size   tempfile?   to_s   write_to_file  

External Aliases

tmp -> tmp?

Attributes

content_type  [RW]  Content type of the bytes.
path  [RW]  Path of a file saving the bytes.
tmp  [RW] 

Public Class methods

Create an instance from specified file.

Create an instance from specified IO object. If you give this a File object, sets "path" attribute of the instance.

Public Instance methods

Appends bytes to the bytes.

Returns true if the bytes of each objects are equal.

Returns bytes with spcified length or whole length if you omit it.

Executes the block for every byte.

Returns length of the bytes.

size()

Alias for length

Returns the object as a string.

Writes the bytes to a specified file.

[Validate]