module CMSScanner::Finders::Finding

Finding

Constants

FINDING_OPTS

Public Class Methods

included(base) click to toggle source

Fix for “Double/Dynamic Inclusion Problem”

Calls superclass method
# File lib/cms_scanner/finders/finding.rb, line 8
def self.included(base)
  base.include References
  super(base)
end

Public Instance Methods

<=>(other) click to toggle source
# File lib/cms_scanner/finders/finding.rb, line 49
def <=>(other)
  to_s.downcase <=> other.to_s.downcase
end
confidence() click to toggle source

@return [ Integer ]

# File lib/cms_scanner/finders/finding.rb, line 29
def confidence
  @confidence ||= 0
end
confidence=(value) click to toggle source

@param [ Integer ] value

# File lib/cms_scanner/finders/finding.rb, line 34
def confidence=(value)
  @confidence = value >= 100 ? 100 : value
end
confirmed_by() click to toggle source

@return [ Array ]

# File lib/cms_scanner/finders/finding.rb, line 18
def confirmed_by
  @confirmed_by ||= []
end
eql?(other) click to toggle source

TODO: maybe also check for interesting_entries and confirmed_by ? So far this is used in specs only

# File lib/cms_scanner/finders/finding.rb, line 45
def eql?(other)
  self == other && confidence == other.confidence && found_by == other.found_by
end
interesting_entries() click to toggle source

Should be overriden in child classes @return [ Array ]

# File lib/cms_scanner/finders/finding.rb, line 24
def interesting_entries
  @interesting_entries ||= []
end
parse_finding_options(opts = {}) click to toggle source

@param [ Hash ] opts

# 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