Class: Copyleaks::Internet
- Inherits:
-
NewResultsInternet
- Object
- NewResultsInternet
- Copyleaks::Internet
- Defined in:
- lib/copyleaks/models/submissions/webhooks/HelperModels/ResultsModels/Internet.rb
Instance Attribute Summary collapse
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
Attributes inherited from NewResultsInternet
#id, #introduction, #matchedWords, #metadata, #title, #url
Instance Method Summary collapse
- #as_json(*_args) ⇒ Object
-
#initialize(tags:, **options) ⇒ Internet
constructor
A new instance of Internet.
- #to_json(*options) ⇒ Object
Constructor Details
#initialize(tags:, **options) ⇒ Internet
Returns a new instance of Internet.
25 26 27 28 29 30 31 32 |
# File 'lib/copyleaks/models/submissions/webhooks/HelperModels/ResultsModels/Internet.rb', line 25 def initialize(tags:, **) unless .is_a?(Array) && .all? { |tag| tag.is_a?(Tags) } raise 'Copyleaks::Internet - tags must be an Array of Tags' end super(**) # Initialize parent class with other params @tags = end |
Instance Attribute Details
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
22 23 24 |
# File 'lib/copyleaks/models/submissions/webhooks/HelperModels/ResultsModels/Internet.rb', line 22 def @tags end |
Instance Method Details
#as_json(*_args) ⇒ Object
34 35 36 |
# File 'lib/copyleaks/models/submissions/webhooks/HelperModels/ResultsModels/Internet.rb', line 34 def as_json(*_args) super.merge(tags: @tags) end |
#to_json(*options) ⇒ Object
38 39 40 |
# File 'lib/copyleaks/models/submissions/webhooks/HelperModels/ResultsModels/Internet.rb', line 38 def to_json(*) as_json(*).to_json(*) end |