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