Class: Rhessus::Scan

Inherits:
ActiveResource::Base
  • Object
show all
Defined in:
lib/connections/scan.rb

Direct Known Subclasses

ScanRunner

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.checkoutObject



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/connections/scan.rb', line 7

def checkout
  new.tap do |x|
    begin
      x.load(format.decode(post(:checkout).body))
      puts self
      x.should_fire = true
    rescue Exception => e
	    puts e
      x.should_fire = false
    end
  end
end

Instance Method Details

#checkin(result_string) ⇒ Object



21
22
23
24
25
# File 'lib/connections/scan.rb', line 21

def checkin(result_string)
  self.results = ::Rhessus.parse_results(result_string)
  puts "Attemping to checkin"
  post(:checkin) 
end

#failureObject



27
28
29
# File 'lib/connections/scan.rb', line 27

def failure
  post(:failure)
end

#should_fire=(x) ⇒ Object



35
36
37
# File 'lib/connections/scan.rb', line 35

def should_fire=(x)
  @should_fire = x
end

#should_fire?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/connections/scan.rb', line 31

def should_fire?
  @should_fire
end