class Copyleaks::SubmissionPdfColors

Public Class Methods

new( mainStrip = nil, title = nil, identical = nil, minorChanges = nil, relatedMeaning = nil ) click to toggle source

@param [String] mainStrip - The color of the main strip in the header. @param [String] title - The color for titles in copyleaks result report. @param [String] identical - The highlight color for identical matches. @param [String] minorChanges - The highlight color for minor changes matches. @param [String] relatedMeaning - The highlight color for related meaning matches.

# File lib/copyleaks/models/submissions/properties/pdf_colors.rb, line 32
def initialize(
    mainStrip = nil,
    title = nil,
    identical = nil,
    minorChanges = nil,
    relatedMeaning = nil
)
    @mainStrip = mainStrip
    @title = title
    @identical = identical
    @minorChanges = minorChanges
    @relatedMeaning = relatedMeaning
end

Public Instance Methods

as_json(*_args) click to toggle source
# File lib/copyleaks/models/submissions/properties/pdf_colors.rb, line 46
def as_json(*_args)
    {
        mainStrip: @mainStrip,
        title: @title,
        identical: @identical,
        minorChanges: @minorChanges,
        relatedMeaning: @relatedMeaning
    }.select { |_k, v| !v.nil? }
end
to_json(*options) click to toggle source
# File lib/copyleaks/models/submissions/properties/pdf_colors.rb, line 56
def to_json(*options)
    as_json(*options).to_json(*options)
end