Class: Lara::Models::ProfanitiesResult

Inherits:
Base
  • Object
show all
Defined in:
lib/lara/models/text.rb

Overview

Wraps profanity detection results for both target and (optionally) source text. Returned in TextResult#profanities when profanities_detect is set.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

parse_time

Constructor Details

#initialize(target: nil, source: nil) ⇒ ProfanitiesResult

Returns a new instance of ProfanitiesResult.



80
81
82
83
84
# File 'lib/lara/models/text.rb', line 80

def initialize(target: nil, source: nil)
  super()
  @target = target
  @source = source
end

Instance Attribute Details

#sourceProfanityDetectResult, ... (readonly)

Returns:



78
79
80
# File 'lib/lara/models/text.rb', line 78

def source
  @source
end

#targetProfanityDetectResult, ... (readonly)

Returns:



76
77
78
# File 'lib/lara/models/text.rb', line 76

def target
  @target
end