Method: WASP::Wasp#initialize

Defined in:
lib/wasp/wasp.rb

#initialize(args) ⇒ Wasp

Returns a new instance of Wasp.



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/wasp/wasp.rb', line 17

def initialize(args)
  @num_wasps = if args[:server].nil? then WASP::Const::DEFAULT_WASPS
              else
                args[:server].to_i
              end
              
  @weapon_name = if args[:weapon].nil? then WASP::Const::DEFAULT_WASPS
            else
              args[:weapon]
            end
  
  @header = args[:header]
            
  @report  = if args[:report].nil? then false
             else 
               true
             end
             
  @keepalive = if args[:keepalive].nil? then false
               else
                 true
               end
  @without_cookie = if args[:wo_cookie].nil? then false
                    else
                      true
                    end
  @compact = if args[:compact].nil? then false
       else
         true
       end
  
  @ec2 = WASP::Aws.new(args)
  @params = []
  
end