Class: Pikuri::Sanitizer::Warning

Inherits:
Data
  • Object
show all
Defined in:
lib/pikuri/sanitizer.rb

Overview

One reason a piece of text was flagged, ready for a chrome to render however it surfaces warnings (bold yellow line, web banner).

  • kind — a Symbol category: :backspace, :control_bytes, :bidi, :zero_width, or :mixed_script.

  • offenders — the distinct offending tokens, in first-seen order: the escaped forms (+“\x1b”+, “\u{202e}”) for byte categories, the raw tokens (+“Pаypal”+) for :mixed_script.

  • explanation — a one-line, chrome-agnostic English summary of what the bytes can do.

Instance Attribute Summary collapse

Instance Attribute Details

#explanationObject (readonly)

Returns the value of attribute explanation

Returns:

  • (Object)

    the current value of explanation



71
72
73
# File 'lib/pikuri/sanitizer.rb', line 71

def explanation
  @explanation
end

#kindObject (readonly)

Returns the value of attribute kind

Returns:

  • (Object)

    the current value of kind



71
72
73
# File 'lib/pikuri/sanitizer.rb', line 71

def kind
  @kind
end

#offendersObject (readonly)

Returns the value of attribute offenders

Returns:

  • (Object)

    the current value of offenders



71
72
73
# File 'lib/pikuri/sanitizer.rb', line 71

def offenders
  @offenders
end