class Copyleaks::NewResultsInternet
Attributes
Public Class Methods
Source
# File lib/copyleaks/models/submissions/webhooks/HelperModels/NewResultsModels/NewResultsInternet.rb, line 29 def initialize(id:, title:, introduction:, matchedWords:, scanId:, metadata:, url:) raise 'Copyleaks::NewResultsInternet - id must be a String' unless id.is_a?(String) raise 'Copyleaks::NewResultsInternet - title must be a String' unless title.is_a?(String) raise 'Copyleaks::NewResultsInternet - introduction must be a String' unless introduction.is_a?(String) raise 'Copyleaks::NewResultsInternet - matchedWords must be an Integer' unless matchedWords.is_a?(Integer) raise 'Copyleaks::NewResultsInternet - metadata must be a Metadata' unless metadata.is_a?(Metadata) raise 'Copyleaks::NewResultsInternet - url must be a String' unless url.is_a?(String) @id = id @title = title @introduction = introduction @matchedWords = matchedWords @metadata = metadata @url = url end
@param [String] id - Unique result ID to identify the result. @param [String] title - Document title. Mostly extracted from the document content. @param [String] introduction - Document brief introduction. Mostly extracted from the document content. @param [Integer] matchedWords - Total matched words between this result and the scanned document. @param [Metadata] metadata - Metadata
object @param [String] url - Public URL of the resource.
Public Instance Methods
Source
# File lib/copyleaks/models/submissions/webhooks/HelperModels/NewResultsModels/NewResultsInternet.rb, line 45 def as_json(*_args) { id: @id, title: @title, introduction: @introduction, matchedWords: @matchedWords, metadata: @metadata, url: @url } end
Source
# File lib/copyleaks/models/submissions/webhooks/HelperModels/NewResultsModels/NewResultsInternet.rb, line 56 def to_json(*options) as_json(*options).to_json(*options) end