module CMSScanner::Finders::Finding
Constants
- FINDING_OPTS
Public Class Methods
Source
# File lib/cms_scanner/finders/finding.rb, line 8 def self.included(base) base.include References super end
Fix for “Double/Dynamic Inclusion Problem”
Calls superclass method
Public Instance Methods
Source
# File lib/cms_scanner/finders/finding.rb, line 49 def <=>(other) to_s.downcase <=> other.to_s.downcase end
Source
# File lib/cms_scanner/finders/finding.rb, line 29 def confidence @confidence ||= 0 end
@return [ Integer ]
Source
# File lib/cms_scanner/finders/finding.rb, line 34 def confidence=(value) @confidence = [value, 100].min end
@param [ Integer ] value
Source
# File lib/cms_scanner/finders/finding.rb, line 18 def confirmed_by @confirmed_by ||= [] end
@return [ Array ]
Source
# File lib/cms_scanner/finders/finding.rb, line 45 def eql?(other) self == other && confidence == other.confidence && found_by == other.found_by end
TODO: maybe also check for interesting_entries
and confirmed_by
? So far this is used in specs only
Source
# File lib/cms_scanner/finders/finding.rb, line 24 def interesting_entries @interesting_entries ||= [] end
Should be overriden in child classes @return [ Array ]
Source
# File lib/cms_scanner/finders/finding.rb, line 39 def parse_finding_options(opts = {}) FINDING_OPTS.each { |opt| send("#{opt}=", opts[opt]) if opts.key?(opt) } end
@param [ Hash ] opts