class ChatCorrect::PunctuationMasqueradingAsSpellingError

Attributes

token_a[R]
token_b[R]

Public Class Methods

new(token_a:, token_b:) click to toggle source
# File lib/chat_correct/punctuation_masquerading_as_spelling_error.rb, line 4
def initialize(token_a:, token_b:)
  @token_a = token_a
  @token_b = token_b
end

Public Instance Methods

exists?() click to toggle source
# File lib/chat_correct/punctuation_masquerading_as_spelling_error.rb, line 9
def exists?
  (token_a.include?('ƪ') || token_b.include?('ƪ')) &&
    token_a.delete("ƪ").eql?(token_b.delete("ƪ"))
end