Class: RRTF::Style
Abstract
Overview
Represents an abstract style that can be applied to elements within a
document AND appear in a document's stylesheet (i.e. paragraph,
character, table, & section styles).
Instance Attribute Summary collapse
Instance Method Summary
collapse
#prefix, #push_colours, #push_fonts, #rtf_formatting, #suffix
Constructor Details
#initialize(options = {}) ⇒ Style
Constructor for the style class.
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# File 'lib/rrtf/style/style.rb', line 26
def initialize(options = {})
options = {
"name" => nil,
"handle" => nil,
"priority" => nil,
"primary" => false,
"additive" => false,
"next_style_handle" => nil,
"auto_update" => false,
"based_on_style_handle" => nil,
"hidden" => false
}.merge(options)
super(options)
@handle = options.delete("handle")
@name = options.delete("name")
@priority = options.delete("priority")
@flow = options.delete("flow")
@primary = options.delete("primary")
@additive = options.delete("additive")
@next_style_handle = options.delete("next_style_handle")
@auto_update = options.delete("auto_update")
@hidden = options.delete("hidden")
end
|
Instance Attribute Details
#additive ⇒ Object
10
11
12
|
# File 'lib/rrtf/style/style.rb', line 10
def additive
@additive
end
|
#auto_update ⇒ Object
10
11
12
|
# File 'lib/rrtf/style/style.rb', line 10
def auto_update
@auto_update
end
|
#based_on_style_handle ⇒ Object
10
11
12
|
# File 'lib/rrtf/style/style.rb', line 10
def based_on_style_handle
@based_on_style_handle
end
|
#handle ⇒ Object
10
11
12
|
# File 'lib/rrtf/style/style.rb', line 10
def handle
@handle
end
|
#hidden ⇒ Object
10
11
12
|
# File 'lib/rrtf/style/style.rb', line 10
def hidden
@hidden
end
|
#name ⇒ Object
10
11
12
|
# File 'lib/rrtf/style/style.rb', line 10
def name
@name
end
|
#next_style_handle ⇒ Object
10
11
12
|
# File 'lib/rrtf/style/style.rb', line 10
def next_style_handle
@next_style_handle
end
|
#primary ⇒ Object
10
11
12
|
# File 'lib/rrtf/style/style.rb', line 10
def primary
@primary
end
|
#priority ⇒ Object
10
11
12
|
# File 'lib/rrtf/style/style.rb', line 10
def priority
@priority
end
|
Instance Method Details
#to_rtf(document) ⇒ Object
Constructs the RTF formatting representing the style in a Stylesheet.
(override in derived classes as needed).
56
57
58
|
# File 'lib/rrtf/style/style.rb', line 56
def to_rtf(document)
nil
end
|