Class: Veracode::Result::Category
Instance Method Summary
collapse
api_field, api_type_field, #initialize
Instance Method Details
#cwe ⇒ Object
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
# File 'lib/veracode/api/detailed.rb', line 68
def cwe
@cwe ||= []
begin
if @cwe.empty?
if @xml_hash.cwe.class == Array
@cwe = @xml_hash.cwe.map do |c|
CWE.new(c)
end
else
@cwe << CWE.new(@xml_hash.cwe)
end
end
rescue NoMethodError
end
return @cwe
end
|
#description ⇒ Object
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
# File 'lib/veracode/api/detailed.rb', line 34
def description
temp = self.desc.para.map do |para|
para.text
end
self.desc.para.map do |para|
if !para.bulletitem.nil?
x = para.bulletitem.each.map do |item|
"* " + item.text + "\r\n"
end
end
temp << x.join
end
return temp.join("\r\n\r\n").strip
end
|
30
31
32
|
# File 'lib/veracode/api/detailed.rb', line 30
def pcirelated?
@pcirelated ||= @xml_hash.pcirelated.to_bool
end
|
#recommendation ⇒ Object
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
# File 'lib/veracode/api/detailed.rb', line 51
def recommendation
temp = self.recommendations.para.map do |para|
para.text
end
self.recommendations.para.map do |para|
if !para.bulletitem.nil?
x = para.bulletitem.each.map do |item|
"* " + item.text + "\r\n"
end
end
temp << x.join
end
return temp.join("\r\n\r\n").strip
end
|