Class: Lara::Models::DetectedProfanity
- Defined in:
- lib/lara/models/text.rb
Instance Attribute Summary collapse
-
#end_char_index ⇒ Object
readonly
Returns the value of attribute end_char_index.
-
#score ⇒ Object
readonly
Returns the value of attribute score.
-
#start_char_index ⇒ Object
readonly
Returns the value of attribute start_char_index.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(text:, start_char_index:, end_char_index:, score:) ⇒ DetectedProfanity
constructor
A new instance of DetectedProfanity.
Methods inherited from Base
Constructor Details
#initialize(text:, start_char_index:, end_char_index:, score:) ⇒ DetectedProfanity
Returns a new instance of DetectedProfanity.
45 46 47 48 49 50 51 |
# File 'lib/lara/models/text.rb', line 45 def initialize(text:, start_char_index:, end_char_index:, score:) super() @text = text @start_char_index = start_char_index @end_char_index = end_char_index @score = score end |
Instance Attribute Details
#end_char_index ⇒ Object (readonly)
Returns the value of attribute end_char_index.
43 44 45 |
# File 'lib/lara/models/text.rb', line 43 def end_char_index @end_char_index end |
#score ⇒ Object (readonly)
Returns the value of attribute score.
43 44 45 |
# File 'lib/lara/models/text.rb', line 43 def score @score end |
#start_char_index ⇒ Object (readonly)
Returns the value of attribute start_char_index.
43 44 45 |
# File 'lib/lara/models/text.rb', line 43 def start_char_index @start_char_index end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
43 44 45 |
# File 'lib/lara/models/text.rb', line 43 def text @text end |