class Copyleaks::SubmissionWritingFeedback
Attributes
Public Class Methods
Source
# File lib/copyleaks/models/submissions/properties/writing_feedback.rb, line 30 def initialize(enable = false, score = nil) unless [true, false].include?(enable) raise 'Copyleaks::SubmissionWritingFeedback - enable - enable must be of type Boolean' end unless score.nil? || score.is_a?(ScoreWeights) raise 'Copyleaks::SubmissionWritingFeedback - score - score must be of type ScoreWeights' end @enable = enable @score = score end
@param [Boolean] Enable automated Writing Assistant . This feature includes grammar checking, spell checking and sentence structure corrections. @param [ScoreWeights] an object containing the score weights for different writing aspects (e.g., grammar, mechanics). Optional.
Public Instance Methods
Source
# File lib/copyleaks/models/submissions/properties/writing_feedback.rb, line 42 def as_json(*_args) { enable: @enable, score: @score }.reject { |_k, v| v.nil? } end
Source
# File lib/copyleaks/models/submissions/properties/writing_feedback.rb, line 49 def to_json(*options) as_json(*options).to_json(*options) end