Class: RTF::Style

Inherits:
Object
  • Object
show all
Defined in:
lib/rtf/style.rb

Overview

This is a parent class that all style classes will derive from.

Direct Known Subclasses

CharacterStyle, DocumentStyle, ParagraphStyle

Constant Summary collapse

LEFT_TO_RIGHT =

A definition for a character flow setting.

:rtl
RIGHT_TO_LEFT =

A definition for a character flow setting.

:ltr

Instance Method Summary collapse

Instance Method Details

#is_character_style?Boolean

Used to determine if the style applies to characters. This method always returns false and should be overridden by derived classes as needed.

Returns:

  • (Boolean)


42
43
44
# File 'lib/rtf/style.rb', line 42

def is_character_style?
   false
end

#is_document_style?Boolean

Used to determine if the style applies to documents. This method always returns false and should be overridden by derived classes as needed.

Returns:

  • (Boolean)


54
55
56
# File 'lib/rtf/style.rb', line 54

def is_document_style?
   false
end

#is_paragraph_style?Boolean

Used to determine if the style applies to paragraphs. This method always returns false and should be overridden by derived classes as needed.

Returns:

  • (Boolean)


48
49
50
# File 'lib/rtf/style.rb', line 48

def is_paragraph_style?
   false
end

#is_table_style?Boolean

Used to determine if the style applies to tables. This method always returns false and should be overridden by derived classes as needed.

Returns:

  • (Boolean)


60
61
62
# File 'lib/rtf/style.rb', line 60

def is_table_style?
   false
end

#prefix(fonts, colours) ⇒ Object

This method retrieves the command prefix text associated with a Style object. This method always returns nil and should be overridden by derived classes as needed.

Parameters

fonts

A reference to the document fonts table. May be nil if no fonts are used.

colours

A reference to the document colour table. May be nil if no colours are used.



23
24
25
# File 'lib/rtf/style.rb', line 23

def prefix(fonts, colours)
   nil
end

#suffix(fonts, colours) ⇒ Object

This method retrieves the command suffix text associated with a Style object. This method always returns nil and should be overridden by derived classes as needed.

Parameters

fonts

A reference to the document fonts table. May be nil if no fonts are used.

colours

A reference to the document colour table. May be nil if no colours are used.



36
37
38
# File 'lib/rtf/style.rb', line 36

def suffix(fonts, colours)
   nil
end