Class: Veracode::Result::Severity

Inherits:
Common::Base show all
Defined in:
lib/veracode/api/detailed.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



90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/veracode/api/detailed.rb', line 90

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