Class: Copyleaks::SubmissionAiGeneratedText
- Inherits:
-
Object
- Object
- Copyleaks::SubmissionAiGeneratedText
- Defined in:
- lib/copyleaks/models/submissions/properties/ai_generated_text.rb
Instance Method Summary collapse
- #as_json(*_args) ⇒ Object
-
#initialize(detect = false) ⇒ SubmissionAiGeneratedText
constructor
A new instance of SubmissionAiGeneratedText.
- #to_json(*options) ⇒ Object
Constructor Details
#initialize(detect = false) ⇒ SubmissionAiGeneratedText
Returns a new instance of SubmissionAiGeneratedText.
27 28 29 30 31 |
# File 'lib/copyleaks/models/submissions/properties/ai_generated_text.rb', line 27 def initialize( detect = false ) @detect = detect end |
Instance Method Details
#as_json(*_args) ⇒ Object
33 34 35 36 37 |
# File 'lib/copyleaks/models/submissions/properties/ai_generated_text.rb', line 33 def as_json(*_args) { detect: @detect }.select { |_k, v| !v.nil? } end |
#to_json(*options) ⇒ Object
39 40 41 |
# File 'lib/copyleaks/models/submissions/properties/ai_generated_text.rb', line 39 def to_json(*) as_json(*).to_json(*) end |