Class: ReportBuilder::Builder::Text
Instance Attribute Summary collapse
#options, #parse_level
Class Method Summary
collapse
Instance Method Summary
collapse
#default_options, #graph, #graph_entry, #image, #image_blob, #image_filename, inherited, inherited_classes, #parse_cycle, #parse_element, #save, #section, #table, #table_entry, #toc_entry
Constructor Details
#initialize(builder, options) ⇒ Text
Returns a new instance of Text.
6
7
8
9
|
# File 'lib/reportbuilder/builder/text.rb', line 6
def initialize(builder, options)
super
@out=""
end
|
Instance Attribute Details
#out ⇒ Object
Returns the value of attribute out.
5
6
7
|
# File 'lib/reportbuilder/builder/text.rb', line 5
def out
@out
end
|
#toc ⇒ Object
Returns the value of attribute toc.
4
5
6
|
# File 'lib/reportbuilder/builder/text.rb', line 4
def toc
@toc
end
|
Class Method Details
.code ⇒ Object
11
12
13
|
# File 'lib/reportbuilder/builder/text.rb', line 11
def self.code
%w{text txt}
end
|
Instance Method Details
#html(t) ⇒ Object
29
30
31
|
# File 'lib/reportbuilder/builder/text.rb', line 29
def html(t)
end
|
#new_page ⇒ Object
26
27
28
|
# File 'lib/reportbuilder/builder/text.rb', line 26
def new_page
@out << "\n\n"
end
|
#parse ⇒ Object
15
16
17
18
|
# File 'lib/reportbuilder/builder/text.rb', line 15
def parse
@out="#{@builder.name}\n" unless @builder.no_title
parse_cycle(@builder)
end
|
23
24
25
|
# File 'lib/reportbuilder/builder/text.rb', line 23
def preformatted(t)
@out << t << "\n"
end
|
#text(t) ⇒ Object
19
20
21
22
|
# File 'lib/reportbuilder/builder/text.rb', line 19
def text(t)
ws=" "*((parse_level-1)*2)
@out << ws << t << "\n"
end
|