Class: Rhessus::Scan
- Inherits:
-
ActiveResource::Base
- Object
- ActiveResource::Base
- Rhessus::Scan
- Defined in:
- lib/connections/scan.rb
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
- #checkin(result_string) ⇒ Object
- #failure ⇒ Object
- #should_fire=(x) ⇒ Object
- #should_fire? ⇒ Boolean
Class Method Details
.checkout ⇒ Object
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 |
#failure ⇒ Object
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
31 32 33 |
# File 'lib/connections/scan.rb', line 31 def should_fire? @should_fire end |