class Threatinator::Actions::Run::StatusObserver
Attributes
errors[R]
filtered[R]
missed[R]
parsed[R]
Public Class Methods
new()
click to toggle source
# File lib/threatinator/actions/run/status_observer.rb, line 6 def initialize @missed = @filtered = @parsed = @errors = 0 end
Public Instance Methods
errors?()
click to toggle source
# File lib/threatinator/actions/run/status_observer.rb, line 31 def errors?; @errors > 0; end
filtered?()
click to toggle source
# File lib/threatinator/actions/run/status_observer.rb, line 30 def filtered?; @filtered > 0; end
missed?()
click to toggle source
# File lib/threatinator/actions/run/status_observer.rb, line 28 def missed?; @missed > 0; end
parsed?()
click to toggle source
# File lib/threatinator/actions/run/status_observer.rb, line 29 def parsed?; @parsed > 0; end
total()
click to toggle source
# File lib/threatinator/actions/run/status_observer.rb, line 10 def total @missed + @filtered + @parsed + @errors end
update(message, *args)
click to toggle source
Handles FeedRunner
observations
# File lib/threatinator/actions/run/status_observer.rb, line 15 def update(message, *args) case message when :record_missed @missed += 1 when :record_filtered @filtered += 1 when :record_parsed @parsed += 1 when :record_error @errors += 1 end end