Class: Lara::Models::DetectedProfanity

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

parse_time

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_indexObject (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

#scoreObject (readonly)

Returns the value of attribute score.



43
44
45
# File 'lib/lara/models/text.rb', line 43

def score
  @score
end

#start_char_indexObject (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

#textObject (readonly)

Returns the value of attribute text.



43
44
45
# File 'lib/lara/models/text.rb', line 43

def text
  @text
end