Class RTF::Colour
In: lib/rtf/colour.rb
Parent: Object

This class represents a colour within a RTF document.

Methods

==   new   to_rtf   to_s  

Attributes

blue  [R]  Attribute accessor.
green  [R]  Attribute accessor.
red  [R]  Attribute accessor.

Public Class methods

This is the constructor for the Colour class.

Parameters

red:The intensity setting for red in the colour. Must be an integer between 0 and 255.
green:The intensity setting for green in the colour. Must be an integer between 0 and 255.
blue:The intensity setting for blue in the colour. Must be an integer between 0 and 255.

Exceptions

RTFError:Generated whenever an invalid intensity setting is specified for the red, green or blue values.

Public Instance methods

This method overloads the comparison operator for the Colour class.

Parameters

object:A reference to the object to be compared with.

This method generates the RTF text for a Colour object.

Parameters

indent:The number of spaces to prefix to the lines created by the method. Defaults to zero.

This method returns a textual description for a Colour object.

Parameters

indent:The number of spaces to prefix to the lines created by the method. Defaults to zero.

[Validate]