Class: ResumeArrayFormatter
Instance Method Summary
collapse
#deinit, #init, #trim, #w
Constructor Details
Returns a new instance of ResumeArrayFormatter.
4
5
6
7
|
# File 'lib/teuton/report/formatter/resume/array.rb', line 4
def initialize(report)
super(report)
@data = {}
end
|
Instance Method Details
#build_cases_data ⇒ Object
28
29
30
|
# File 'lib/teuton/report/formatter/resume/array.rb', line 28
def build_cases_data
@data[:cases] = @lines
end
|
#build_data(options) ⇒ Object
15
16
17
18
19
20
|
# File 'lib/teuton/report/formatter/resume/array.rb', line 15
def build_data(options)
build_initial_data
build_cases_data
build_final_data
build_hof_data
end
|
#build_final_data ⇒ Object
32
33
34
35
36
|
# File 'lib/teuton/report/formatter/resume/array.rb', line 32
def build_final_data
tail = {}
@tail.each { |key, value| tail[key] = value }
@data[:results] = tail
end
|
#build_hof_data ⇒ Object
38
39
40
41
42
43
44
45
|
# File 'lib/teuton/report/formatter/resume/array.rb', line 38
def build_hof_data
app = Application.instance
fame = {}
if app.options[:case_number] > 2
app.hall_of_fame.each { |line| fame[line[0]] = line[1] }
end
@data[:hall_of_fame] = fame
end
|
#build_initial_data ⇒ Object
22
23
24
25
26
|
# File 'lib/teuton/report/formatter/resume/array.rb', line 22
def build_initial_data
head = {}
@head.each { |key, value| head[key] = value }
@data[:config] = head
end
|
#process(options = {}) ⇒ Object
9
10
11
12
13
|
# File 'lib/teuton/report/formatter/resume/array.rb', line 9
def process(options = {})
build_data(options)
w @data.to_s deinit
end
|