Class: TopSecret::Text::ScanResult

Inherits:
Object
  • Object
show all
Includes:
Mapping
Defined in:
lib/top_secret/text/scan_result.rb

Overview

Holds the result of a scan operation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Mapping

#categories, #method_missing, #respond_to_missing?, #safe?, #sensitive?

Constructor Details

#initialize(mapping) ⇒ ScanResult

Returns a new instance of ScanResult.

Parameters:

  • mapping (Hash)

    Map of labels to matched values



13
14
15
# File 'lib/top_secret/text/scan_result.rb', line 13

def initialize(mapping)
  @mapping = mapping
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class TopSecret::Mapping

Instance Attribute Details

#mappingHash (readonly)

Returns Mapping of redacted labels to matched values.

Returns:

  • (Hash)

    Mapping of redacted labels to matched values



10
11
12
# File 'lib/top_secret/text/scan_result.rb', line 10

def mapping
  @mapping
end