Class: Copyleaks::SubmissionIndexing
- Inherits:
-
Object
- Object
- Copyleaks::SubmissionIndexing
- Defined in:
- lib/copyleaks/models/submissions/properties/indexing.rb
Instance Method Summary collapse
- #as_json(*_args) ⇒ Object
-
#initialize(repositories) ⇒ SubmissionIndexing
constructor
A new instance of SubmissionIndexing.
- #to_json(*options) ⇒ Object
Constructor Details
#initialize(repositories) ⇒ SubmissionIndexing
Returns a new instance of SubmissionIndexing.
27 28 29 |
# File 'lib/copyleaks/models/submissions/properties/indexing.rb', line 27 def initialize(repositories) @repositories = repositories end |
Instance Method Details
#as_json(*_args) ⇒ Object
31 32 33 34 35 |
# File 'lib/copyleaks/models/submissions/properties/indexing.rb', line 31 def as_json(*_args) { repositories: @repositories }.select { |_k, v| !v.nil? } end |
#to_json(*options) ⇒ Object
37 38 39 |
# File 'lib/copyleaks/models/submissions/properties/indexing.rb', line 37 def to_json(*) as_json(*).to_json(*) end |