Class: Veracode::Result::SummarySeverity

Inherits:
Common::Base show all
Defined in:
lib/veracode/api/summary.rb

Instance Method Summary collapse

Methods inherited from Common::Base

api_field, api_type_field, #initialize

Constructor Details

This class inherits a constructor from Veracode::Common::Base

Instance Method Details

#categoriesObject



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/veracode/api/summary.rb', line 16

def categories
  @categories ||= [] 
  begin
    if @categories.empty?
      if @xml_hash.category.class == Array 
        @categories = @xml_hash.category.map do |sev|
          SummaryCategory.new(sev)
        end
      else
        @categories << SummaryCategory.new(@xml_hash.category) 
      end
    end
  rescue NoMethodError
  end

  return @categories
end