Class: Copyleaks::NewResultsInternet
- Inherits:
-
Object
- Object
- Copyleaks::NewResultsInternet
- Defined in:
- lib/copyleaks/models/submissions/webhooks/HelperModels/NewResultsModels/NewResultsInternet.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#introduction ⇒ Object
readonly
Returns the value of attribute introduction.
-
#matchedWords ⇒ Object
readonly
Returns the value of attribute matchedWords.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #as_json(*_args) ⇒ Object
-
#initialize(id:, title:, introduction:, matchedWords:, scanId:, metadata:, url:) ⇒ NewResultsInternet
constructor
A new instance of NewResultsInternet.
- #to_json(*options) ⇒ Object
Constructor Details
#initialize(id:, title:, introduction:, matchedWords:, scanId:, metadata:, url:) ⇒ NewResultsInternet
Returns a new instance of NewResultsInternet.
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# 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 .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 = @url = url end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
21 22 23 |
# File 'lib/copyleaks/models/submissions/webhooks/HelperModels/NewResultsModels/NewResultsInternet.rb', line 21 def id @id end |
#introduction ⇒ Object (readonly)
Returns the value of attribute introduction.
21 22 23 |
# File 'lib/copyleaks/models/submissions/webhooks/HelperModels/NewResultsModels/NewResultsInternet.rb', line 21 def introduction @introduction end |
#matchedWords ⇒ Object (readonly)
Returns the value of attribute matchedWords.
21 22 23 |
# File 'lib/copyleaks/models/submissions/webhooks/HelperModels/NewResultsModels/NewResultsInternet.rb', line 21 def matchedWords @matchedWords end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
21 22 23 |
# File 'lib/copyleaks/models/submissions/webhooks/HelperModels/NewResultsModels/NewResultsInternet.rb', line 21 def @metadata end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
21 22 23 |
# File 'lib/copyleaks/models/submissions/webhooks/HelperModels/NewResultsModels/NewResultsInternet.rb', line 21 def title @title end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
21 22 23 |
# File 'lib/copyleaks/models/submissions/webhooks/HelperModels/NewResultsModels/NewResultsInternet.rb', line 21 def url @url end |
Instance Method Details
#as_json(*_args) ⇒ Object
45 46 47 48 49 50 51 52 53 54 |
# 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 |
#to_json(*options) ⇒ Object
56 57 58 |
# File 'lib/copyleaks/models/submissions/webhooks/HelperModels/NewResultsModels/NewResultsInternet.rb', line 56 def to_json(*) as_json(*).to_json(*) end |