Class: Veracode::Result::CallStack

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

#callsObject



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/veracode/api/call_stack.rb', line 19

def calls
  @calls ||= []
  begin  
    if @calls.empty?      
      if @xml_hash.call.class == Array
        @calls = @xml_hash.call.map do |item|
          Call.new(item)
        end
      else
        @calls << Call.new(@xml_hash.call)
      end
    end
  rescue NoMethodError
  end
  return @calls
end